Skip to content
Snippets Groups Projects
Commit a39c31ee authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

Test if file VERSION exists

parent 0c87ffa9
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,17 @@ content:
toplevel=$(git rev-parse --show-toplevel)
f=${toplevel}/VERSION
touch $f
if [ ! -f "$f" ]; then
touch "$f"
git add "$f" 2>/dev/null
fi
old_version=$(cat $f)
new_version=$(git describe --tags --abbrev=0)
if [ "$old_version" != "$new_version" ]; then
echo "$new_version" > $f
echo "$new_version" > "$f"
git commit -am "update version to '"$new_version"'"
git push origin # Is required because normal push does not necessarily happen
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment