RE: Incrementing a build number in PerlApp
by Jan Dubois other posts by this author
Feb 18 2008 11:41PM messages near this date
Re: Incrementing a build number in PerlApp
|
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
|