#!/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 # rpmbuild -ts cpgx-1.0.tar.gz --define "dist .el5" # brew build --scratch --skip-tag dist-5E-eso cpgx-1.0-1.el5.src.rpm