RE: Incrementing a build number in PerlApp
by huub other posts by this author
Feb 19 2008 3:02AM messages near this date
Re: Incrementing a build number in PerlApp
|
Re: Incrementing a build number in PerlApp
If I recall correctly, Jenda Krynicky made a tool a while back that includes such a feature.
I remember it incremented "build" numbers on each "compile"
http://jenda.krynicky.cz/#PDKcompile
I think it's quite old but might be usefull.
Cheers,
Huub
----- Original Message -----
From: Jan Dubois [mailto:jand@[...].com]
To: jhfoo-ml@[...].com
Cc: pdk@[...].com
Sent: Mon, 18 Feb 2008 23:41:02 -0800
Subject: RE: Incrementing a build number in PerlApp
On Mon, 18 Feb 2008, Foo JH wrote:
> Can you advise me on how I can write this wrapper? I'd be glad to
> contribute back to the community once I get it right.
You just keep a little text file with the build number around that
you increment each time you run your build.pl script. A quick and
dirty one could be as simple as this:
chomp(my $build = `type buildno 2> nul` || 0);
++$build;
system("echo $build > buildno");
my $version = "1.2.0.$build";
system(qq(perlapp --info "ProductVersion=$version" @ARGV));
perl build.pl -f --script foo.pl --add Foo::Bar
You should of course add additional code to put quotes around
@ARGV entries containing spaces, and you probably need to specify
more values to --info to make it work properly, but this is the
general idea.
Cheers,
-Jan
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Foo JH
Jan Dubois
Jenda Krynicky
Foo JH
huub
Foo JH
Jan Dubois
Foo JH
Jan Dubois
Foo JH
Jan Dubois
Foo JH
|