1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-26 23:58:35 -06:00
chhoto-url/docker_push_script.sh

16 lines
579 B
Bash
Raw Normal View History

#!/bin/env bash
2024-03-23 16:07:55 -05:00
if [ "$1" == "dev" ]; then
docker buildx build --push --tag sintan1729/$name:dev --platform linux/amd64
2024-03-23 16:07:55 -05:00
elif [ "$1" == "release" ]; then
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
v_minor=$(echo $v_patch | sed -rn 's/^(.+\..+)\..+$/\1/p')
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
2024-03-23 16:07:55 -05:00
name="chhoto-url"
docker buildx build --push --tag sintan1729/$name:$v_major --tag sintan1729/$v_minor: \
--tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64
2024-03-23 16:07:55 -05:00
fi