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

Test if file VERSION exists

parent c154a605
Branches
No related tags found
No related merge requests found
......@@ -15,12 +15,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