• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: build numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: build numbers
      • From: J Nozzi <email@hidden>
References: 
 >build numbers (From: Christian Schneider <email@hidden>)
 >Re: build numbers (From: Steve Checkoway <email@hidden>)
 >Re: build numbers (From: Christian Schneider <email@hidden>)

  • Prev by Date: Re: Global hotkeys
  • Next by Date: Re: build numbers
  • Previous by thread: Re: build numbers
  • Next by thread: Re: build numbers
  • Index(es):
    • Date
    • Thread