Skip to content

Commit 732cfe6

Browse files
cfergeauopenshift-merge-robot
authored andcommitted
macos: Add 'rootDir' variable to signing script
This removes some repetition of "${BASEDIR}/root" and will make some refactoring in the next commit a bit easier.
1 parent 50b08d5 commit 732cfe6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packaging/darwin/macos-pkg-build-and-sign.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,25 @@ function signAppBundle() {
4040
codesign --deep --sign "${CODESIGN_IDENTITY}" --options runtime --timestamp --force --entitlements "${entitlements}" "$1"
4141
}
4242

43-
binDir="${BASEDIR}/root/Applications/Red Hat OpenShift Local.app/Contents/Resources"
43+
rootDir="${BASEDIR}/root"
44+
binDir="${rootDir}/Applications/Red Hat OpenShift Local.app/Contents/Resources"
4445

4546
version=$(cat "${BASEDIR}/VERSION")
4647

47-
pkgbuild --analyze --root ${BASEDIR}/root ${BASEDIR}/components.plist
48+
pkgbuild --analyze --root "${rootDir}" ${BASEDIR}/components.plist
4849
plutil -replace BundleIsRelocatable -bool NO ${BASEDIR}/components.plist
4950

5051
sign "${binDir}/crc"
5152
sign "${binDir}/crc-admin-helper-darwin"
5253
sign "${binDir}/vfkit"
5354

54-
signAppBundle "${BASEDIR}/root/Applications/Red Hat OpenShift Local.app"
55+
signAppBundle "${rootDir}/Applications/Red Hat OpenShift Local.app"
5556

5657
sudo chmod +sx "${binDir}/crc-admin-helper-darwin"
5758

5859
pkgbuild --identifier com.redhat.crc --version ${version} \
5960
--scripts "${BASEDIR}/scripts" \
60-
--root "${BASEDIR}/root" \
61+
--root "${rootDir}" \
6162
--install-location / \
6263
--component-plist "${BASEDIR}/components.plist" \
6364
"${OUTPUT}/crc.pkg"

0 commit comments

Comments
 (0)