exit 1
fi
+if (svn st | grep -v makesrcdist | grep -qv '^\?'); then
+ echo Local changes remain:
+ svn st | grep -v makesrcdist | grep -v '^\?'
+ exit 1
+fi
+
if test $# = 0; then
echo Updating for snapshot...
svn up
+
+ # Compute version for snapshot
rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
- version="1.5svn"
+ version="1.6svn"
revision="-r$rev"
- fileversion="1.5svn-r$rev"
+ fileversion="1.6svn-r$rev"
fileurl="http://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar."
url="."
else
- echo Creating tag for release...
+ # Use version from command-line
rev="1"
version=$1
revision=""
fileurl="http://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar."
url="https://svn.easysw.com/public/cups/tags/release-$version"
+ echo Validating sources...
+ cupsversionpatch=`echo $version | awk -F. '{print $3}'`
+ cupsversion=`printf "1.06%02d" $cupsversionpatch`
+
+ temp=`grep CUPS_VERSION cups/cups.h | grep -v CUPS_VERSION_ | awk '{print $4}'`
+ if test "$temp" != $cupsversion; then
+ echo "Still need to update CUPS_VERSION to $cupsversion in cups/cups.h (saw $temp)"
+ exit 1
+ fi
+
+ temp=`grep CUPS_VERSION_PATCH cups/cups.h | awk '{print $4}'`
+ if test "$temp" != $cupsversionpatch; then
+ echo "Still need to update CUPS_VERSION_PATCH to $cupsversionpatch in cups/cups.h (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -1 README.txt | awk '{print $4}'`
+ if test "$temp" != "v$version"; then
+ echo "Still need to update version to v$version in README.txt (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -1 INSTALL.txt | awk '{print $4}'`
+ if test "$temp" != "v$version"; then
+ echo "Still need to update version to v$version in INSTALL.txt (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -4 CHANGES.txt | grep "CHANGES IN" | awk '{print $4}'`
+ if test "$temp" != "V$version"; then
+ echo "Still need to add CHANGES IN V$version in CHANGES.txt (saw $temp)"
+ exit 1
+ fi
+
+ echo Creating tag for release...
svn copy https://svn.easysw.com/public/cups/trunk "$url" \
-m "Tag $version" || exit 1
fi