1
0
Fork 0
forked from lthn/blockchain

increment build number script fix

This commit is contained in:
sowle 2021-06-02 00:19:06 +03:00
parent ea4145f467
commit 8f92109520
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -3,12 +3,11 @@ curr_path=${BASH_SOURCE%/*}
version_file_path=../src/version.h.in
pushd $curr_path
# clear old local changes if any
git checkout -- src/*
git pull --ff-only
if [ $? -ne 0 ]; then
echo "Failed to pull"
popd
exit $?
fi
build_no_before=`cat $version_file_path | grep 'PROJECT_VERSION_BUILD_NO ' | awk {'print $3'}`
@ -19,15 +18,11 @@ build_no_after=`cat $version_file_path | grep 'PROJECT_VERSION_BUILD_NO ' | awk
echo "$build_no_before -> $build_no_after"
echo $(pwd -P)
git status
git commit -a -m"=== build number: $build_no_before -> $build_no_after ==="
git push
if [ $? -ne 0 ]; then
echo "Failed to push"
popd
exit $?
fi
echo "Build number was succesefully incremented."
popd