Skip to content

Commit

Permalink
Updated utility version to 1.0.1 and made it available through a prop…
Browse files Browse the repository at this point in the history
…erty.
  • Loading branch information
tomaz committed Sep 15, 2009
1 parent 89d09be commit 606325d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CommandLineParser.h
Expand Up @@ -260,11 +260,14 @@ This is used by the log macros, so in most cases, you'll not use it directly in
@property(readonly) int verboseLevel;

//////////////////////////////////////////////////////////////////////////////////////////
/// @name Properties - undocumented
/// @name Properties - "undocumented"
//////////////////////////////////////////////////////////////////////////////////////////

/** This is used to show or hide the output from the external utilities such as @c doxygen
and @c docsetutil. */
@property(readonly) BOOL emitUtilityOutput;

/** The version of appledoc. */
@property(readonly) NSString* version;

@end
12 changes: 9 additions & 3 deletions CommandLineParser.m
Expand Up @@ -296,8 +296,6 @@ - (void) parseCommandLineArguments:(const char**) argv
NSParameterAssert(argv != nil);
NSParameterAssert(argc > 0);

logNormal(@"Parsing command line arguments...");

// Copy the command line arguments to internal array. Note that since the array
// will retain all strings, we don't have to retain for each option separately.
[commandLineArguments removeAllObjects];
Expand All @@ -310,6 +308,8 @@ - (void) parseCommandLineArguments:(const char**) argv
// Parse the verbose level first, so that we will correctly log as soon as possible.
// Then log the utility command line.
[self parseIntegerWithShortcut:@"-v" andName:@"--verbose" forKey:kTKCmdVerboseLevelKey];
logNormal(@"appledoc v%@", [self version]);
logNormal(@"Parsing command line arguments...");
logVerbose([commandLineArguments objectAtIndex:0]);

// Reset the parsing data and read the data from the global templates. This has to
Expand Down Expand Up @@ -455,7 +455,7 @@ - (void) validateCommandLineArguments
- (void) printUsage
{
printf("USAGE: appledoc [options]\n");
printf("VERSION: 1.0\n");
printf("VERSION: %s\n", [[self version] cStringUsingEncoding:NSASCIIStringEncoding]);
printf("\n");
printf("OPTIONS - required\n");
printf("-p --project <name>\n");
Expand Down Expand Up @@ -1028,4 +1028,10 @@ - (BOOL) emitUtilityOutput
return [[parameters objectForKey:kTKCmdEmitUtilityOutputKey] boolValue];
}

//----------------------------------------------------------------------------------------
- (NSString*) version
{
return @"1.0.1";
}

@end

0 comments on commit 606325d

Please sign in to comment.