1
0
Fork 0
forked from lthn/blockchain
blockchain/utils/increment_build_number.sh

30 lines
663 B
Bash
Raw Permalink Normal View History

2018-12-27 18:50:45 +03:00
set -e
curr_path=${BASH_SOURCE%/*}
version_file_path=../src/version.h.in
pushd $curr_path
2021-06-02 00:19:06 +03:00
# clear old local changes if any
2021-06-02 00:46:10 +03:00
git checkout -- ../src/*
2021-06-02 00:19:06 +03:00
git pull --ff-only
2018-12-27 18:50:45 +03:00
build_no_before=`cat $version_file_path | grep 'PROJECT_VERSION_BUILD_NO ' | awk {'print $3'}`
../../zano-tools-last-build/connectivity_tool --increment-build-no=$version_file_path
build_no_after=`cat $version_file_path | grep 'PROJECT_VERSION_BUILD_NO ' | awk {'print $3'}`
echo "$build_no_before -> $build_no_after"
echo $(pwd -P)
2021-06-02 00:19:06 +03:00
2018-12-27 18:50:45 +03:00
git status
git commit -a -m"=== build number: $build_no_before -> $build_no_after ==="
git push
echo "Build number was succesefully incremented."
popd