From: Jani Laakso Date: Tue, 13 Mar 2007 20:07:18 +0000 (+0000) Subject: Added make-release.pl script. X-Git-Tag: 6.7.0.beta1~6529 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=404cbc068bfa26f787db53765e2969832b79176c;p=vaadin-framework.git Added make-release.pl script. svn changeset:875/svn branch:trunk --- diff --git a/build/make-release.pl b/build/make-release.pl new file mode 100644 index 0000000000..4f74e16bec --- /dev/null +++ b/build/make-release.pl @@ -0,0 +1,66 @@ +#!/usr/bin/perl -w + +use strict; + +my $usage = + "Usage: make-release.sh \n". + " is new major.minor version, e.g. 4.0\n". + " is new version, e.g. 4.0.1-rc3\n". + " is dir to store release zip file, e.g. internal/4.0.1-rc/\n"; + +die ("This is not yet tested, do not use.\n"); + +my $BRANCH = shift(@ARGV) || die($usage); +my $VERSION = shift(@ARGV) || die($usage); +my $DIR = shift(@ARGV) || die($usage); + +my $t = ""; + +if (!$BRANCH =~ /([4-9]{1}\.[0-9]{1})/) { + die (" must be format {x}.{y} where {x}=major (4-9), ". + "{y}=minor (0-9).\n"); +} +if ( + (!$VERSION =~ /[4-9]{1}\.[0-9]{1,2}.[0-9]{1,3}/) && + (!$VERSION =~ /[4-9]{1}\.[0-9]{1,2}.[0-9]{1,3}-rc[0-9]{1,2}/) + ) { + die (" must be format {x}.{y}.{z} or x.y.z-rc{m} ". + "where {x}=major (4-9), {y}=minor (0-99), {z}=revision ". + "(0-999) and optional release candidate number {m}=(0-99).\n"); +} +if ( + (!$DIR =~ /release\/[4-9]{1}\.[0-9]{1,2}.[0-9]{1,3}/) && + (!$DIR =~ /internal\/[4-9]{1}\.[0-9]{1,2}.[0-9]{1,3}-rc[0-9]{1,2}/) + ) { + die (" must be e.g. internal/4.0.1-rc/ or release/4.0.\n"); +} + +# go to directory where repository working copies (WC) are +`cd ~/toolkit`; +# it's safest to replace 4.0 from trunk (but you could use also merging) +`svn rm https://svn.itmill.com/svn/itmill-toolkit/branches/$BRANCH -m "Recreating $BRANCH branch from trunk. Removing old $BRANCH."`; +`svn copy https://svn.itmill.com/svn/itmill-toolkit/trunk https://svn.itmill.com/svn/itmill-toolkit/branches/$BRANCH -m "Recreating $BRANCH branch from trunk. Copying new $BRANCH."`; +# checkout $BRANCH +`svn co https://svn.itmill.com/svn/itmill-toolkit/branches/$BRANCH`; + +# go to $BRANCH directory +chdir("$BRANCH"); +# fix links as VERSION changes +`sed s/cat build/VERSION | cut -f2 -d'='/$VERSION/ index.html >index.html`; +# increment VERSION +`echo "version=$VERSION" >build/VERSION`; + +# commit changes +`svn ci -m "Building release."`; + +# execute build script, takes 5-40 minutes depending on hw +`ant`; + +# copy branch 4.0 into tags directory (some may interpret this as tagging) +`svn copy https://svn.itmill.com/svn/itmill-toolkit/branches/4.0 https://svn.itmill.com/svn/itmill-toolkit/tags/ -m "Copying $VERSION into tags."`; + +# commit release package zip to SVN +`cp result/itmill-toolkit-$VERSION.zip ~/toolkit/builds/$DIR`; +chdir("~/toolkit/builds/$DIR"); +`svn add itmill-toolkit-$VERSION.zip`; +`svn ci -m "Added $VERSION release."`;