Permalink
Browse files

Merge pull request #281 from baarde/master

Issue affecting docset bundle filename when publishing without installing
  • Loading branch information...
2 parents 7b0a898 + f4c4158 commit 0dad5c6cdb5c367c4e69bca77c1db1f5b572aa36 @tomaz committed Dec 10, 2012
Showing with 13 additions and 1 deletion.
  1. +13 −1 Generating/GBDocSetPublishGenerator.m
@@ -27,9 +27,21 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
task.reportIndividualLines = YES;
// Get the path to the installed documentation set and extract the name. Then replace the name's extension with .xar.
- NSString *installedDocSetPath = self.inputUserPath;
+ NSString *inputDocSetPath = self.inputUserPath;
NSString *packageName = self.settings.docsetPackageFilename;
NSString *atomName = self.settings.docsetAtomFilename;
+ NSString *installedDocSetPath = inputDocSetPath;
+
+ // If installation was skipped, move the docset folder to a .docset bundle.
+ if (!self.settings.installDocSet) {
+ installedDocSetPath = [self.settings.outputPath stringByAppendingPathComponent:self.settings.docsetBundleFilename];
+ installedDocSetPath = [installedDocSetPath stringByStandardizingPath];
+ GBLogVerbose(@"Moving DocSet files from '%@' to '%@'...", inputDocSetPath, installedDocSetPath);
+ if (![self copyOrMoveItemFromPath:inputDocSetPath toPath:installedDocSetPath error:error]) {
+ GBLogWarn(@"Failed moving DocSet files from '%@' to '%@'!", inputDocSetPath, installedDocSetPath);
+ return NO;
+ }
+ }
// Prepare command line arguments for packaging.
NSString *outputDir = self.outputUserPath;

0 comments on commit 0dad5c6

Please sign in to comment.