ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved