mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-11-22 17:26:45 +00:00
chg: Change the push script to work with the new setup
This commit is contained in:
parent
ffb4846239
commit
2baa481040
2
Makefile
2
Makefile
@ -17,4 +17,4 @@ clean:
|
|||||||
cargo clean --manifest-path=actix/Cargo.toml
|
cargo clean --manifest-path=actix/Cargo.toml
|
||||||
rm -rf .docker
|
rm -rf .docker
|
||||||
|
|
||||||
.PHONY: build clean docker
|
.PHONY: build
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
if [ "$1" == "dev" ]; then
|
if [ "$1" == "dev" ]; then
|
||||||
name="chhoto-url"
|
docker buildx build --push --tag sintan1729/$name:dev --platform linux/amd64
|
||||||
docker build -t $name .
|
|
||||||
docker tag $name sintan1729/$name:dev
|
|
||||||
docker push sintan1729/$name:dev
|
|
||||||
|
|
||||||
elif [ "$1" == "release" ]; then
|
elif [ "$1" == "release" ]; then
|
||||||
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
|
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
|
||||||
@ -12,26 +9,7 @@ elif [ "$1" == "release" ]; then
|
|||||||
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
|
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
|
||||||
|
|
||||||
name="chhoto-url"
|
name="chhoto-url"
|
||||||
|
docker buildx build --push --tag sintan1729/$name:$v_major --tag sintan1729/$v_minor: \
|
||||||
docker build -t $name .
|
--tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64
|
||||||
|
|
||||||
for tag in $v_major $v_minor $v_patch latest
|
|
||||||
do
|
|
||||||
docker tag $name sintan1729/$name:$tag
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Do you want to push these to Docker Hub?"
|
|
||||||
select yn in "Yes" "No";
|
|
||||||
do
|
|
||||||
if [ "$yn"="Yes" ]; then
|
|
||||||
for tag in $v_major $v_minor $v_patch latest
|
|
||||||
do
|
|
||||||
docker push sintan1729/$name:$tag
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Okay! Not pushing."
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user