[X2Go-Commits] [buildscripts] 03/03: bin/generate-nsis-version.pl: consolidate date to always use YYYY.MM.DD, simplify hash append for nightly builds.
git-admin at x2go.org
git-admin at x2go.org
Sun May 10 02:25:21 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 0f2fe2857f6b66f5fd9c5718af818aff7530f0d6
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun May 10 02:17:24 2015 +0200
bin/generate-nsis-version.pl: consolidate date to always use YYYY.MM.DD, simplify hash append for nightly builds.
---
bin/generate-nsis-version.pl | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/bin/generate-nsis-version.pl b/bin/generate-nsis-version.pl
index 7c136d3..a562ebe 100755
--- a/bin/generate-nsis-version.pl
+++ b/bin/generate-nsis-version.pl
@@ -4,13 +4,7 @@ use strict;
use POSIX qw(strftime);
-my $date;
-
-if (defined $ENV{'RELEASE'}) {
- $date = strftime "%Y%m%d", localtime;
-} else {
- $date = strftime "%Y.%m.%d", localtime;
-}
+my $date = strftime "%Y.%m.%d", localtime;
open(F,"<$ARGV[0]/src/version.h") or die;
my @lines=<F>;
@@ -27,11 +21,12 @@ close(F);
$text=join("", at lines);
-if (defined $ENV{'RELEASE'}) {
- $text=~s/X2GOCLIENT_VERSION/$version-$date/;
-} else {
- $text=~s/X2GOCLIENT_VERSION/$version-$date-$hash/;
+my $replacement="$version-$date";
+if (!defined $ENV{'RELEASE'}) {
+ $replacement .= "-$hash";
}
+
+$text=~s/X2GOCLIENT_VERSION/$replacement/;
#print $text;
open(F,">$ARGV[0]/nsis/x2goclient.nsi") or die;
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list