Skip to content

Commit

Permalink
build: macos: Remove the need for packaging/tmp
Browse files Browse the repository at this point in the history
All the work can be done from $(EMBED_DIR). This also unpacks the tray
tarball there instead of unpacking it in Applications, then moving it
and removing the initial dir.
  • Loading branch information
cfergeau authored and praveenkumar committed Jan 9, 2023
1 parent ff701c9 commit afdb7bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ update-go-version:
goversioncheck:
./verify-go-version.sh

TRAY_RELEASE ?= packaging/tmp/crc-tray-macos.tar.gz
TRAY_TARBALL = crc-tray-macos.tar.gz

.PHONY: embed-download-windows embed-download-darwin
embed-download-windows embed-download-darwin: embed-download-%: $(HOST_BUILD_DIR)/crc-embedder
Expand All @@ -318,17 +318,15 @@ packagedir: clean embed-download-darwin macos-universal-binary
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/welcome.html.in >packaging/darwin/Resources/welcome.html
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/postinstall.in >packaging/darwin/scripts/postinstall
chmod 755 packaging/darwin/scripts/postinstall
mkdir -p packaging/tmp/
cp $(EMBED_DOWNLOAD_DIR)/* packaging/tmp/
cp $(EMBED_DOWNLOAD_DIR)/vf.entitlements packaging/vfkit.entitlements
mkdir -p packaging/root/Applications
tar -C packaging/root/Applications -xvzf $(TRAY_RELEASE)
rm $(TRAY_RELEASE)
mv packaging/root/Applications/crc-tray-darwin-universal/crc-tray.app packaging/root/Applications/Red\ Hat\ OpenShift\ Local.app
rm -fr packaging/root/Applications/crc-tray-darwin-universal

mv packaging/tmp/* packaging/root/"$(MACOS_INSTALL_PATH)"
mv $(EMBED_DOWNLOAD_DIR)/vf.entitlements packaging/vfkit.entitlements
tar -C $(EMBED_DOWNLOAD_DIR) -xvzf $(EMBED_DOWNLOAD_DIR)/$(TRAY_TARBALL)
rm $(EMBED_DOWNLOAD_DIR)/$(TRAY_TARBALL)
mv $(EMBED_DOWNLOAD_DIR)/crc-tray-darwin-universal/crc-tray.app packaging/root/Applications/Red\ Hat\ OpenShift\ Local.app
rm -fr $(EMBED_DOWNLOAD_DIR)/crc-tray-darwin-universal

mv $(EMBED_DOWNLOAD_DIR)/* packaging/root/"$(MACOS_INSTALL_PATH)"
cp $(BUILD_DIR)/macos-universal/crc packaging/root/"$(MACOS_INSTALL_PATH)"
cp LICENSE packaging/darwin/Resources/LICENSE.txt

Expand Down
1 change: 0 additions & 1 deletion packaging/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ root/
/windows/msi/
/windows/product.wxs
vfkit.entitlements
/tmp
/*.pkg

0 comments on commit afdb7bc

Please sign in to comment.