mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-20 08:04:28 +01:00
added possibility to publish multiple tags
This commit is contained in:
23
publish.sh
23
publish.sh
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
while getopts v: option
|
while getopts v:t: option
|
||||||
do
|
do
|
||||||
case "${option}"
|
case "${option}"
|
||||||
in
|
in
|
||||||
v) VERSION=${OPTARG};;
|
v) VERSION=${OPTARG};;
|
||||||
|
t) TAG=${OPTARG};;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -14,8 +15,20 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$TAG" ]
|
||||||
|
then
|
||||||
|
echo "Please provide a valid tag with the -t flag. e.g: -t stable (supported tags: dev, stable)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TAG" != "dev" && "$TAG" != "stable" ]]; then
|
||||||
|
echo "Please use either dev or stable as tag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "This will upload a new signal-cli-rest-api to dockerhub"
|
echo "This will upload a new signal-cli-rest-api to dockerhub"
|
||||||
echo "Version: $VERSION"
|
echo "Version: $VERSION"
|
||||||
|
echo "Tag: $TAG"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
read -r -p "Are you sure? [y/N] " response
|
read -r -p "Are you sure? [y/N] " response
|
||||||
@@ -28,8 +41,16 @@ case "$response" in
|
|||||||
docker buildx create --name multibuilder
|
docker buildx create --name multibuilder
|
||||||
docker buildx use multibuilder
|
docker buildx use multibuilder
|
||||||
|
|
||||||
|
if [[ "$TAG" == "stable" ]]; then
|
||||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:$VERSION . --push
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:$VERSION . --push
|
||||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:latest . --push
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:latest . --push
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TAG" == "dev" ]]; then
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:${VERSION}-dev . --push
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t bbernhard/signal-cli-rest-api:latest-dev . --push
|
||||||
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Aborting"
|
echo "Aborting"
|
||||||
|
|||||||
Reference in New Issue
Block a user