added release build
This commit is contained in:
parent
97adf45c51
commit
2eaa1fb847
@ -5,6 +5,7 @@ HELP="USAGE: sh build_docker.sh \n
|
|||||||
[ -t | --tag ] Select a tag for building. Default: latest \n
|
[ -t | --tag ] Select a tag for building. Default: latest \n
|
||||||
[ -i | --image ] Select image tag for building. Default: dasmoorhuhn/atc-mithermometer-gateway \n
|
[ -i | --image ] Select image tag for building. Default: dasmoorhuhn/atc-mithermometer-gateway \n
|
||||||
[ -p | --platforms ] Select the platforms, for which the image should build. Default: linux/amd64,linux/arm64,linux/arm \n
|
[ -p | --platforms ] Select the platforms, for which the image should build. Default: linux/amd64,linux/arm64,linux/arm \n
|
||||||
|
[ -r | --release ] Build a release. Provide the Tag. \n
|
||||||
[ -h | --help ] Get this dialog"
|
[ -h | --help ] Get this dialog"
|
||||||
|
|
||||||
docker buildx version
|
docker buildx version
|
||||||
@ -31,6 +32,12 @@ while [ "$1" != "" ]; do
|
|||||||
TAG=$1
|
TAG=$1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-r | --release )
|
||||||
|
shift
|
||||||
|
TAG=$1
|
||||||
|
RELEASE=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-i | --image )
|
-i | --image )
|
||||||
shift
|
shift
|
||||||
IMAGE=$1
|
IMAGE=$1
|
||||||
@ -52,4 +59,21 @@ while [ "$1" != "" ]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
build_docker
|
if [ "$RELEASE" = true ]; then
|
||||||
|
branch=$(git symbolic-ref --short HEAD)
|
||||||
|
git fetch --prune --prune-tags -f
|
||||||
|
git checkout $TAG
|
||||||
|
echo -------------------------------------
|
||||||
|
git branch
|
||||||
|
echo -------------------------------------
|
||||||
|
git status
|
||||||
|
echo -------------------------------------
|
||||||
|
echo "!!PLEASE CHECK OF THIS IS RIGHT!!"
|
||||||
|
sleep 10
|
||||||
|
build_docker
|
||||||
|
TAG=latest
|
||||||
|
build_docker
|
||||||
|
git checkout $branch
|
||||||
|
else
|
||||||
|
build_docker
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user