sourcegit/build/scripts/package.osx-app.sh

27 lines
637 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2024-08-03 03:01:02 -07:00
set -e
set -o
set -u
set pipefail
2024-08-03 03:01:02 -07:00
if [[ -z "$VERSION" ]]; then
2024-08-03 03:01:02 -07:00
echo "Provide the version as environment variable VERSION"
exit 1
fi
if [[ -z "$RUNTIME" ]]; then
2024-08-03 03:01:02 -07:00
echo "Provide the runtime as environment variable RUNTIME"
exit 1
fi
cd build
mkdir -p SourceGit.app/Contents/Resources
mv SourceGit SourceGit.app/Contents/MacOS
cp resources/app/App.icns SourceGit.app/Contents/Resources/App.icns
sed "s/SOURCE_GIT_VERSION/$VERSION/g" resources/app/App.plist > SourceGit.app/Contents/Info.plist
2024-08-21 01:17:19 -07:00
rm -rf SourceGit.app/Contents/MacOS/SourceGit.dsym
2024-08-03 03:01:02 -07:00
2024-08-21 01:17:19 -07:00
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit.app