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