Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated utility version to 1.0.1 and made it available through a prop…

…erty.
  • Loading branch information...
commit 606325d3b283ae072ca6ebae4c184c16836b5fbb 1 parent 89d09be
tomaz authored
Showing with 13 additions and 4 deletions.
  1. +4 −1 CommandLineParser.h
  2. +9 −3 CommandLineParser.m
5 CommandLineParser.h
View
@@ -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 CommandLineParser.m
View
@@ -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];
@@ -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
@@ -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");
@@ -1028,4 +1028,10 @@ - (BOOL) emitUtilityOutput
return [[parameters objectForKey:kTKCmdEmitUtilityOutputKey] boolValue];
}
+//----------------------------------------------------------------------------------------
+- (NSString*) version
+{
+ return @"1.0.1";
+}
+
@end
Please sign in to comment.
Something went wrong with that request. Please try again.