Skip to content

Commit

Permalink
upload release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekmulla committed Sep 5, 2023
1 parent a431eac commit 9a65dc1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions scripts/release-os/macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
echo "\n\nBundles the application and all its dependencies into a single package (.app)"
pyinstaller --noconfirm --windowed --name="HaX" \
--icon="hax/static/images/icon.png" \
--add-data="hax/config.yml:." \
--add-data="hax/static:static" \
hax/main.py

echo "\n\nCreate a release folder"
mkdir -p release/macos
rm -rf release/macos/*

echo "\n\nCopy the app bundle to the release folder"
cp -r "dist/HaX.app" release/macos

echo "If the dmg already exists, delete it"
test -f "release/HaX.dmg" && rm "release/HaX.dmg"

echo "\n\nCreating the new release:"
create-dmg \
--volname "HaX" \
--volicon "hax/static/images/icon.png" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "HaX.app" 175 120 \
--hide-extension "HaX.app" \
--app-drop-link 425 120 \
"release/HaX.dmg" \
"release/macos/"

echo "\n\nCleanup temp files"
rm -rf dist
rm -rf build
rm -rf release/macos
rm hax.spec

echo "\n\nMacOS Release package (dmg) created successfully"
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if [[ "$OSTYPE" == "linux"* ]]; then
echo "Releasing Linux version"
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Releasing MacOS version (.dmg)"
./scripts/release/macos.sh
./scripts/release-os/macos.sh
elif [[ "$OSTYPE" == "msys" ]]; then
echo "Releasing Windows version (.exe)"
fi

0 comments on commit 9a65dc1

Please sign in to comment.