summaryrefslogtreecommitdiffstats
path: root/cpgx/make-tarball
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2009-06-02 16:12:26 -0500
committerDavid Teigland <teigland@redhat.com>2009-06-03 14:21:15 -0500
commitddd77efc5f80b7a25fdc67a83a6d6781f215ac19 (patch)
tree0c961fcfcd6cf498d1a8b3f2a20b8df6083b7c76 /cpgx/make-tarball
parent82747a02c788c18e52dbb598c0f70a253b417850 (diff)
downloaddct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.tar.gz
dct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.tar.xz
dct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.zip
cpgx: build stuff
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'cpgx/make-tarball')
-rwxr-xr-xcpgx/make-tarball33
1 files changed, 33 insertions, 0 deletions
diff --git a/cpgx/make-tarball b/cpgx/make-tarball
new file mode 100755
index 0000000..f9fc44b
--- /dev/null
+++ b/cpgx/make-tarball
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# to release
+# edit VERSION with new number and without -git
+# edit cpgx.spec with new version numbers
+# commit changes to VERSION and cpgx.spec
+# make tarball (uses commited VERSION and cpgx.spec)
+# edit VERSION adding -git
+# commit VERSION change
+# push
+
+WC=`git diff | wc -l`
+
+if [ "$WC" != "0" ]
+then
+ echo "error uncommited changes"
+ exit 2
+fi
+
+VER=`cat VERSION`
+
+VER2=`awk '/^Version:/ { print $2 }' < cpgx.spec`
+
+if [ "$VER" != "$VER2" ]
+then
+ echo "error VERSION = $VER, cpgx.spec = $VER2"
+ exit 2
+fi
+
+echo "version $VER"
+
+git archive --format=tar --prefix=cpgx-$VER/ HEAD^{tree} | gzip > cpgx-$VER.tar.gz
+