]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - tools/makesrcdist
Merge changes from CUPS 1.6svn-r10267.
[thirdparty/cups.git] / tools / makesrcdist
index 4d672d96fbbe72fe3e41433b2f48145c63d8407c..7b1330d35f59796e2f914e6a236db8c79a6bb739 100755 (executable)
@@ -14,17 +14,25 @@ if test ! -f tools/makesrcdist; then
         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=""
@@ -32,6 +40,41 @@ else
        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