release 782 Bytes
Newer Older
gerd's avatar
gerd committed
1 2 3 4
#! /bin/sh

set -e

gerd's avatar
gerd committed
5 6
version="$(./configure -version)"
echo "$version" >RELEASE
gerd's avatar
gerd committed
7 8

destdir="xstrp4-$version"
gerd's avatar
gerd committed
9 10
trunk="https://godirepo.camlcity.org/svn/lib-xstrp4/trunk"
tag="https://godirepo.camlcity.org/svn/lib-xstrp4/tags/$destdir"
gerd's avatar
gerd committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

mkdir -p packages
rm -rf "packages/$destdir"
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:

status=$(svn status | grep -v '^\?' || true )

if [ -n "$status" ]; then
    echo "Error: svn 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."
	    ;;
    esac
fi