-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
--output-path
when building documentation for multiple targ…
…ets. (#89) * Support using a custom `--output-path` when building a combined archive Also, print all archive output paths at the end instead of during build * Customize the synthesized landing page when DocC supports it * Provide more information about the steps for each target's build task * Support `--output-path` with multiple targets, even without combined documentation * Add integration tests for building combined documentation * Build documentation for different targets concurrently * Code review feedback: move sorting archives to where it's used * Remove unused local variable * Code review feedback: simplify creation of DocCFeatures * Code review feedback: move assertion for better locality with the potential bug. * Fix bug in test helper where other log output was sometimes parsed as an archive output path * Update integration tests to reflect new DocC behavior (synthesized landing pages for combined archives)
- Loading branch information
1 parent
c807246
commit a255bbd
Showing
10 changed files
with
290 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
Plugins/SharedPackagePluginExtensions/Target+doccArchiveOutputPath.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2022 Apple Inc. and the Swift project authors | ||
// Copyright (c) 2022-2024 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See https://swift.org/LICENSE.txt for license information | ||
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
|
||
import PackagePlugin | ||
import Foundation | ||
|
||
extension Target { | ||
func doccArchiveOutputPath(in context: PluginContext) -> String { | ||
return context.pluginWorkDirectory.appending("\(name).doccarchive").string | ||
context.pluginWorkDirectory.appending(archiveName).string | ||
} | ||
|
||
func dependencyDocCArchiveOutputPath(in context: PluginContext) -> String { | ||
context.pluginWorkDirectory.appending("dependencies").appending(archiveName).string | ||
} | ||
|
||
private var archiveName: String { | ||
"\(name).doccarchive" | ||
} | ||
} |
Oops, something went wrong.