2024-03-07 20:30:41 +00:00
|
|
|
#!/bin/env bash
|
|
|
|
|
2024-03-23 21:07:55 +00:00
|
|
|
if [ "$1" == "dev" ]; then
|
2024-03-25 06:22:54 +00:00
|
|
|
docker buildx build --push --tag sintan1729/$name:dev .
|
2024-03-07 20:30:41 +00:00
|
|
|
|
2024-03-23 21:07:55 +00: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-25 06:26:13 +00:00
|
|
|
|
|
|
|
make build
|
2024-03-23 21:07:55 +00:00
|
|
|
name="chhoto-url"
|
2024-03-25 04:33:41 +00:00
|
|
|
docker buildx build --push --tag sintan1729/$name:$v_major --tag sintan1729/$v_minor: \
|
2024-03-25 06:26:13 +00:00
|
|
|
--tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.multiarch .
|
2024-03-23 21:07:55 +00:00
|
|
|
fi
|
2024-03-07 20:30:41 +00:00
|
|
|
|