Commit 9dd07676 authored by Gerd Stolpmann's avatar Gerd Stolpmann

release script

parent 3962c050
......@@ -6,8 +6,6 @@ version="$(./configure -version)"
echo "$version" >RELEASE
destdir="xstrp4-$version"
trunk="https://godirepo.camlcity.org/svn/lib-xstrp4/trunk"
tag="https://godirepo.camlcity.org/svn/lib-xstrp4/tags/$destdir"
mkdir -p packages
rm -rf "packages/$destdir"
......@@ -15,23 +13,28 @@ makepkg -spec xstrp4.files -intree . -outtree "packages/$destdir"
(cd packages; tar czf "$destdir.tar.gz" "$destdir")
echo "Wrote packages/$destdir.tar.gz"
# Checking for svn:
master="$(git branch | grep '* master')"
if [ -z "$master" ]; then
echo "Error: not on master branch"
exit 1
fi
status=$(svn status | grep -v '^\?' || true )
status="$(git status -uno -s)"
if [ -n "$status" ]; then
echo "Error: svn status not clean"
echo "Error: git status not clean"
exit 1
else
printf "Tag revision (y/n)? "
read answer
case "$answer" in
y|Y|yes|YES)
svn cp "$trunk" "$tag"
echo "New tag: $tag"
;;
*)
echo "Nothing tagged."
;;
y|Y|yes|YES)
git tag -a -m "xstrp4-$version" xstrp4-$version
git push --tags origin master
echo "New tag: xstrp4-$version"
;;
*)
echo "Nothing tagged."
;;
esac
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment