Skip to content

Commit

Permalink
update release.pl and creatensis.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 20, 2014
1 parent 8a149fe commit 8cccdc5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ms-windows/osgeo4w/creatensis.pl
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,19 @@ sub getDeps {

print "Downloading $file [$f]...\n" if $verbose;
system "wget $wgetopt -c $f";
die "download of $f failed" if $?;
die "download of $f failed" if $? or ! -f $file;

if( exists $md5{$file} ) {
my $md5;
open F, "md5sum $file|";
while(<F>) {
if( /^(\S+)\s+$file$/ ) {
if( /^(\S+)\s+\*?$file$/ ) {
$md5 = $1;
}
}
close F;

die "No md5sum of $p determined" unless defined $md5;
die "No md5sum of $p determined [$file]" unless defined $md5;
if( $md5 eq $md5{$file} ) {
print "md5sum of $file verified.\n" if $verbose;
} else {
Expand Down Expand Up @@ -224,7 +224,7 @@ sub getDeps {
print O "$pn $p 0\n";

print "Unpacking $p...\n" if $verbose;
system "tar $taropt -C $unpacked -xjvf $p | gzip -c >$unpacked/etc/setup/$pn.lst.gz";
system "bash -c 'tar $taropt -C $unpacked -xjvf $p | gzip -c >$unpacked/etc/setup/$pn.lst.gz && [ \${PIPESTATUS[0]} == 0 -a \${PIPESTATUS[1]} == 0 ]'";
die "unpacking of $p failed" if $?;
}

Expand Down
25 changes: 22 additions & 3 deletions scripts/release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,39 @@ sub updateCMakeLists {
}

print "Last pull rebase...\n";
system("git pull --rebase") == 0 or die "git pull rebase failed";
system( "git pull --rebase" ) == 0 or die "git pull rebase failed";

my $release = "$newmajor.$newminor";
my $relbranch = "release-${newmajor}_${newminor}";
my $reltag = "final-${newmajor}_${newminor}_0";

print "Creating branch...\n";
system("git checkout -b $relbranch" ) == 0 or die "git checkout release branch failed";
system( "git checkout -b $relbranch" ) == 0 or die "git checkout release branch failed";
updateCMakeLists($newmajor,$newminor,$releasename);

print "Updating branch...\n";
system("dch -r ''" ) == 0 or die "dch failed";
system( "dch -r ''" ) == 0 or die "dch failed";
system( "dch --newversion $newmajor.$newminor.0 'Release of $release'" ) == 0 or die "dch failed";
system( "cp debian/changelog /tmp" ) == 0 or die "backup changelog failed";

if( -f "images/splash/splash-release.png" ) {
system( "cp -v images/splash/splash-release.png images/splash/splash.png" ) == 0 or die "splash png switch failed";
} else {
print "WARNING: NO images/splash/splash-release.png\n";
}

if( -f "images/splash/splash-release.xcf.bz2" ) {
system( "cp -v images/splash/splash-release.xcf.bz2 images/splash/splash.xcf.bz2" ) == 0 or die "splash xcf switch failed";
} else {
print "WARNING: NO images/splash/splash-release.xcf.bz2\n";
}

if( -f "ms-windows/Installer-Files/WelcomeFinishPage-release.bmp" ) {
system( "cp -v ms-windows/Installer-Files/WelcomeFinishPage-release.bmp ms-windows/Installer-Files/WelcomeFinishPage.bmp" ) == 0 or die "installer bitmap switch failed";
} else {
print "WARNING: NO ms-windows/Installer-Files/WelcomeFinishPage-release.bmp\n";
}

system( "git commit -a -m 'Release of $release ($releasename)'" ) == 0 or die "release commit failed";
system( "git tag $reltag -m 'Version $release'" ) == 0 or die "tag failed";

Expand Down

0 comments on commit 8cccdc5

Please sign in to comment.