[#17] Small changes to build script
parent
93ec27bb02
commit
34b32a3252
10
build
10
build
|
@ -18,12 +18,10 @@ done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
# Extract current version from Cargo.toml & get current branch
|
# Extract current version from Cargo.toml & get current branch
|
||||||
patch_version="$(grep -Po '(?<=version = ").*(?=")' Cargo.toml | head -n1)"
|
patch_version=`grep -Po '(?<=version = ").*(?=")' Cargo.toml | head -n1`
|
||||||
major_version="$(echo "$patch_version" |
|
major_version=`echo "$patch_version" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/'`
|
||||||
sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/')"
|
minor_version=`echo "$patch_version" | sed -E 's/([0-9]+).([0-9]+).([0-9]+)/\1.\2/'`
|
||||||
minor_version="$(echo "$patch_version" |
|
branch=`git rev-parse --abbrev-ref HEAD`
|
||||||
sed -E 's/([0-9]+).([0-9]+).([0-9]+)/\1.\2/')"
|
|
||||||
branch="$(git branch --show-current)"
|
|
||||||
|
|
||||||
if [[ "$branch" = "master" ]]; then
|
if [[ "$branch" = "master" ]]; then
|
||||||
tags=("$patch_version" "$minor_version" "$major_version" "latest")
|
tags=("$patch_version" "$minor_version" "$major_version" "latest")
|
||||||
|
|
Loading…
Reference in New Issue