X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=id-release;h=5acbcfb700b1c1b5345821000efebfa710d03aaf;hb=a6306ca601895f4386246f302500df983c9e275b;hp=937a6e63cd589ee4723c690ca38c6167be43f20f;hpb=1892465937933eea3c89ac0009b8fa4685294a47;p=git-tools-moved-to-github.git diff --git a/id-release b/id-release index 937a6e6..5acbcfb 100755 --- a/id-release +++ b/id-release @@ -1,10 +1,11 @@ #!/bin/sh -# Copyright (c) 2011 IndexData ApS. http://indexdata.com +# Copyright (c) 2011-2015 IndexData ApS. http://indexdata.com # Author: Wolfram Schneider # # id-release - a helper script to build a release & packaging for debian + redhat # # see http://twiki.indexdata.dk/cgi-bin/twiki/view/ID/IDSoftwareRelease +# https://twiki.indexdata.com/twiki/bin/view/ID/AdamsReleaseProcedure # die early set -e @@ -21,11 +22,14 @@ case $1 in * ) usage ;; esac -echo "Did you updated the news log file?" +echo "# See also https://twiki.indexdata.com/twiki/bin/view/ID/AdamsReleaseProcedure" +echo "" + +echo "# Did you updated the news log file?" for file in Changes News NEWS do if [ -e $file ]; then - ls -l $file + echo "# $(ls -l $file)" fi done echo "" @@ -42,7 +46,7 @@ else perl=false fi -if [ `ls |egrep '\.spec$' | wc -l` -eq 0 ]; then +if [ `ls | egrep '\.spec$' | wc -l` -eq 0 ]; then usage "No *.spec file found" else spec=`ls |egrep '\.spec$' | head -1` @@ -56,12 +60,12 @@ fi perl -i.bak -npe "s,VERSION=.*,VERSION=$version," IDMETA if $java; then - echo "set maven version to $version" + echo "# set maven version to $version" mvn versions:set -DnewVersion=$version > mvn-versions.log fi if $perl; then - echo "check perl version numbers" + echo "# check perl version numbers" find . -name '*.pm' -print0 | xargs -0 egrep -H '\$VERSION.*=.*[0-9]' | egrep -v '^\./deb-src/' fi @@ -72,16 +76,12 @@ perl -i.bak -npe "\$. == 1 && s,\(.*?\),($version)," debian/changelog perl -i.bak -npe "s,^Version: \d+.*,Version: $version," $spec - ###################################################################### -echo "" echo "# Please commit the version updates now" -echo "git commit -a" +echo "git commit -a -m'new release v$version'" echo "" -echo "# Please run now" -echo "git push" +echo "# Please tag now (we will push later to origin)" echo "git tag v$version" -echo "git push origin tag v$version" if $java; then echo "mvn versions:set -DnewVersion=$version-SNAPSHOT" @@ -89,31 +89,13 @@ fi ###################################################################### echo "" -echo "# On RedHat or centos, please run the commands" -echo "sudo date # ask for password early" -echo "git pull" +echo "# On mochi, please run the commands" echo "\$HOME/proj/git-tools/id-deb-build/mkdist.sh" -echo "sudo cp $package-$version.tar.gz /usr/src/redhat/SOURCES/" -echo "sudo rpmbuild -ba $spec" -echo "# if successfully, scp the package to ftp.indexdata.dk (kebab)" -echo "\$HOME/proj/git-tools/id-rpm-build/upload-rpms.sh $spec" -echo "" -echo "# on kebab run: sudo su" -echo "# cd $HOME/proj/git-tools/update-archive && ./update-yum-archive.sh" - - -###################################################################### -echo "" -echo "# On debian or ubuntu, please run the commands" -echo "sudo rm -rf deb-src" -echo "git pull" -echo "\$HOME/proj/git-tools/id-deb-build/mkdist.sh" -echo "\$HOME/proj/git-tools/id-deb-build/id-mk-deb-src.sh" -echo "sudo \$HOME/proj/git-tools/id-deb-build/id-pbuild.sh" -echo "# if successfully, scp the package to ftp.indexdata.dk (kebab)" +echo "\$HOME/proj/git-tools/id-deb-build/id-pbuild.sh" echo "\$HOME/proj/git-tools/id-deb-build/id-pbuild.sh --upload" echo "" -echo "# on kebab run: sudo su; cd $HOME/proj/git-tools/update-archive; ./update-archive.sh" -echo "" +echo "# if successfully, don't forget to push to origin" +echo "git push origin master" +echo "git push origin tag v$version"