forked from lthn/blockchain
increment build number script fix
This commit is contained in:
parent
ea4145f467
commit
8f92109520
1 changed files with 5 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue