mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 23:58:35 -06:00
new: Added a dev tag option
This commit is contained in:
parent
cde3fb4c89
commit
8dbb6e9bd6
1 changed files with 30 additions and 22 deletions
|
@ -1,5 +1,12 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
|
if [ "$1" == "dev" ]; then
|
||||||
|
name="chhoto-url"
|
||||||
|
docker build -t $name .
|
||||||
|
docker tag $name sintan1729/$name:dev
|
||||||
|
docker push sintan1729/$name:dev
|
||||||
|
|
||||||
|
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')
|
||||||
v_minor=$(echo $v_patch | sed -rn 's/^(.+\..+)\..+$/\1/p')
|
v_minor=$(echo $v_patch | sed -rn 's/^(.+\..+)\..+$/\1/p')
|
||||||
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
|
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
|
||||||
|
@ -26,4 +33,5 @@ do
|
||||||
fi
|
fi
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue