28 lines
700 B
Bash
Executable File
28 lines
700 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: $0 <release_version>"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p snap/gui
|
|
|
|
export DO_STARTUP_NOTIFY="true"
|
|
export APP_NAME="Coop"
|
|
export APP_CLI="coop"
|
|
export APP_ICON="\${SNAP}/meta/gui/coop.png"
|
|
export APP_ARGS="%U"
|
|
envsubst < "crates/coop/resources/coop.desktop.in" > "snap/gui/coop.desktop"
|
|
cp "crates/coop/resources/icon.png" "snap/gui/coop.png"
|
|
|
|
RELEASE_VERSION="$1" envsubst < crates/coop/resources/snap/snapcraft.yaml.in > snap/snapcraft.yaml
|
|
|
|
# Clean seems to be needed to actually check that the snapcraft.yaml
|
|
# works. For example, when a `stage-package` is removed, it will
|
|
# still remain on rebuild.
|
|
snapcraft clean
|
|
|
|
snapcraft
|