Re: build numbers
Re: build numbers
- Subject: Re: build numbers
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 16 Sep 2004 14:03:59 +0200
At 9:07 Uhr +0200 16.09.2004, Christian Schneider wrote:
thanks, I based my solution on that. As I'm writing ObjC I use a
shell script in conjunction with an ObjC class:
=== Shell script ===
#/bin/sh
now=$(date)
perl -p -i -e "s/return @\"[^\"]*\"/return \@\"$now\"/" GFFBuildInfo.m
Why didn't you say you just wanted the date and not a build number?
There's a way that involves no Perl at all:
Change your shell script to:
#/bin/sh
touch GFFBuildInfo.m
and your ObjC class to:
=== ObjC Class ===
@implementation GFFBuildInfo
+ (NSString *) buildDate
{
return [NSString stringWithCString: __DATE__];
}
@end
__DATE__ and __TIME__ are official preprocessor macros.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden