Skip to content

Commit bd48e2e

Browse files
committed
Local vars for osx signing script functions
1 parent 515d447 commit bd48e2e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/scripts/sign-osx-distro-file.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,22 @@ function signExecutableInsideJar2() {
7979

8080
function signExecutableInsideNestedJar() {
8181
local pwd=`pwd`
82-
for f in `find $1 -type f | grep -E $2`
82+
for jar_file in `find $1 -type f | grep -E $2`
8383
do
84-
local f_name="$(basename -- $f)"
84+
local f_name="$(basename -- $jar_file)"
8585
local extracted_jar_dir=extracted_${f_name}
8686
rm -rf $extracted_jar_dir
8787
mkdir $extracted_jar_dir
88-
echo "Extracting archive ${f}"
89-
unzip -q $f -d ./${extracted_jar_dir}
88+
echo "Extracting archive ${jar_file}"
89+
unzip -q $jar_file -d ./${extracted_jar_dir}
9090
signExecutableInsideJar2 $extracted_jar_dir $3 $4 $5
91-
pwd
92-
ls
9391
cd $extracted_jar_dir
94-
zip -r -u ../$f .
92+
ls
93+
zip -r -u ../$jar_file .
9594
cd ..
9695
rm -rf $extracted_jar_dir
97-
echo "Signing binary file: ${f}"
98-
codesign --verbose --deep --force --timestamp --entitlements "${entitlements}" --options=runtime --keychain "${KEYCHAIN}" -s "${MACOS_CERTIFICATE_ID}" $f
96+
echo "Signing binary file: ${jar_file}"
97+
codesign --verbose --deep --force --timestamp --entitlements "${entitlements}" --options=runtime --keychain "${KEYCHAIN}" -s "${MACOS_CERTIFICATE_ID}" $jar_file
9998
done
10099
cd $pwd
101100
}

0 commit comments

Comments
 (0)