From 2eb38d21ce4f79837753aa443801d76f2367b522 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 13 Jun 2022 12:18:00 +0700 Subject: [PATCH] deploy unstable --- deploy.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 538e234..1e3d8aa 100755 --- a/deploy.sh +++ b/deploy.sh @@ -70,7 +70,8 @@ function docker_publish { sudo docker buildx build \ --platform linux/amd64,linux/arm64 \ -t bbilly1/tilefy \ - -t bbilly1/tilefy:"$VERSION" --push . + -t bbilly1/tilefy:"$VERSION" \ + -t bbilly1/tilefy:unstable --push . # create release tag echo "commits since last version:" @@ -80,6 +81,21 @@ function docker_publish { } +# publish unstable tag to docker +function sync_unstable { + + if [[ $(systemctl is-active docker) != 'active' ]]; then + echo "starting docker" + sudo systemctl start docker + fi + + # start amd64 build + sudo docker buildx build \ + --platform linux/amd64 \ + -t bbilly1/tilefy:unstable --push . + +} + if [[ $1 == "test" ]]; then rebuild_test @@ -89,8 +105,10 @@ elif [[ $1 == "validate" ]]; then validate "$2" elif [[ $1 == "docker" ]]; then docker_publish +elif [[ $1 == "unstable" ]]; then + sync_unstable else - echo "valid options are: test | docker " + echo "valid options are: test | docker | unstable" fi ##