minor fix of the snap publish script

This commit is contained in:
Andrey Meshkov 2020-05-14 23:28:01 +03:00
parent c64fdf9442
commit 3b258e536b

View File

@ -10,7 +10,7 @@ SNAP_NAME="adguard-home"
LAUNCHPAD_CREDENTIALS_DIR=".local/share/snapcraft/provider/launchpad"
if [[ -z ${VERSION} ]]; then
VERSION=`git describe --abbrev=4 --dirty --always --tags`
VERSION=$(git describe --abbrev=4 --dirty --always --tags)
echo "VERSION env variable is not set, getting it from git: ${VERSION}"
fi
@ -229,10 +229,15 @@ publish_docker() {
exit 1
fi
if [[ -n "$2" ]]; then
echo "ARCH is set to $2"
ARCH=$2 publish_snap_docker
else
ARCH=i386 publish_snap_docker
ARCH=arm64 publish_snap_docker
ARCH=armhf publish_snap_docker
ARCH=amd64 publish_snap_docker
fi
}
publish() {
@ -246,10 +251,15 @@ publish() {
exit 1
fi
if [[ -n "$2" ]]; then
echo "ARCH is set to $2"
ARCH=$2 publish_snap
else
ARCH=i386 publish_snap
ARCH=arm64 publish_snap
ARCH=armhf publish_snap
ARCH=amd64 publish_snap
fi
}
cleanup() {
@ -270,8 +280,8 @@ fi
case "$1" in
"build-docker") build_docker $2 ;;
"build") build $2 ;;
"publish-docker-beta") publish_docker beta ;;
"publish-docker-release") publish_docker stable ;;
"publish-docker-beta") publish_docker beta $2 ;;
"publish-docker-release") publish_docker stable $2 ;;
"publish-beta") publish beta ;;
"publish-release") publish stable ;;
"prepare") prepare ;;