build: versioning, ignore android keystore file
This commit is contained in:
parent
fa0232d4c4
commit
1783c2e143
3 changed files with 14 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
android/.gradle
|
android/.gradle
|
||||||
android/local.properties
|
android/local.properties
|
||||||
android/keystore
|
android/keystore
|
||||||
|
android/keystore.asc
|
||||||
android/keystore.properties
|
android/keystore.properties
|
||||||
/.idea
|
/.idea
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
case $1 in
|
case $2 in
|
||||||
x86|arm)
|
x86_64|arm)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: release_macos.sh [platform]\n - platform: 'x86', 'arm'" >&2
|
echo "Usage: release_linux.sh [version] [platform]\n - platform: 'x86_64', 'arm'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ cd ${BASEDIR}
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Setup platform argument
|
# Setup platform argument
|
||||||
[[ $1 == "x86" ]] && arch+=(x86_64-unknown-linux-gnu)
|
[[ $2 == "x86_64" ]] && arch+=(x86_64-unknown-linux-gnu)
|
||||||
[[ $1 == "arm" ]] && arch+=(aarch64-unknown-linux-gnu)
|
[[ $2 == "arm" ]] && arch+=(aarch64-unknown-linux-gnu)
|
||||||
|
|
||||||
# Start release build with zig linker for cross-compilation
|
# Start release build with zig linker for cross-compilation
|
||||||
cargo install cargo-zigbuild
|
cargo install cargo-zigbuild
|
||||||
|
@ -24,5 +24,4 @@ cargo zigbuild --release --target ${arch}
|
||||||
# Create AppImage with https://github.com/AppImage/appimagetool
|
# Create AppImage with https://github.com/AppImage/appimagetool
|
||||||
cp target/${arch}/release/grim linux/Grim.AppDir/AppRun
|
cp target/${arch}/release/grim linux/Grim.AppDir/AppRun
|
||||||
rm target/${arch}/release/*.AppImage
|
rm target/${arch}/release/*.AppImage
|
||||||
appimagetool linux/Grim.AppDir
|
appimagetool linux/Grim.AppDir target/${arch}/release/grim-v$1-linux-$2.AppImage
|
||||||
mv *.AppImage target/${arch}/release/Grim-0.1.0-linux-$1.AppImage
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
case $1 in
|
case $2 in
|
||||||
x86|arm|all)
|
x86_64|arm|universal)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: release_macos.sh [platform]\n - platform: 'x86', 'arm', 'all'" >&2
|
echo "Usage: release_macos.sh [platform]\n - platform: 'x86_64', 'arm', 'universal'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ rustup target add aarch64-apple-darwin
|
||||||
rm -rf target/x86_64-apple-darwin
|
rm -rf target/x86_64-apple-darwin
|
||||||
rm -rf target/aarch64-apple-darwin
|
rm -rf target/aarch64-apple-darwin
|
||||||
|
|
||||||
[[ $1 == "x86" ]] && arch+=(x86_64-apple-darwin)
|
[[ $2 == "x86_64" ]] && arch+=(x86_64-apple-darwin)
|
||||||
[[ $1 == "arm" ]] && arch+=(aarch64-apple-darwin)
|
[[ $2 == "arm" ]] && arch+=(aarch64-apple-darwin)
|
||||||
[[ $1 == "all" ]] && arch+=(universal2-apple-darwin)
|
[[ $2 == "universal" ]] && arch+=(universal2-apple-darwin)
|
||||||
|
|
||||||
# Start release build with zig linker for cross-compilation
|
# Start release build with zig linker for cross-compilation
|
||||||
# zig 0.12 required
|
# zig 0.12 required
|
||||||
|
@ -47,7 +47,7 @@ yes | cp -rf target/${arch}/release/grim macos/Grim.app/Contents/MacOS
|
||||||
#rcodesign sign --pem-file cert.pem macos/Grim.app
|
#rcodesign sign --pem-file cert.pem macos/Grim.app
|
||||||
|
|
||||||
# Create release package
|
# Create release package
|
||||||
FILE_NAME=Grim-0.1.0-macos-$1.zip
|
FILE_NAME=Grim-$1-macos-$2.zip
|
||||||
rm -rf target/${arch}/release/${FILE_NAME}
|
rm -rf target/${arch}/release/${FILE_NAME}
|
||||||
cd macos
|
cd macos
|
||||||
zip -r ${FILE_NAME} Grim.app
|
zip -r ${FILE_NAME} Grim.app
|
||||||
|
|
Loading…
Reference in a new issue