Skip to content

Commit 0bf9624

Browse files
heckjbripeticca
andauthored
Migrates plugin documentation into DocC (#8766)
Migrate, and break up, content from `documentation/plugins.md` into DocC articles. resolves #8592 With the branch checked out, you can use the command: ```bash swift package --disable-sandbox preview-documentation --target PackageManagerDocs ``` To build and display the collected documentation for easier reviewing. --------- Co-authored-by: Bri Peticca <[email protected]>
1 parent 8c28054 commit 0bf9624

27 files changed

+665
-4
lines changed

Sources/PackageManagerDocs/Documentation.docc/Documentation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ The Swift Package Manager lets you share your code as a package, depend on and u
3030
- <doc:BundlingResources>
3131
- <doc:ReleasingPublishingAPackage>
3232
- <doc:ContinuousIntegration>
33-
- <doc:UsingShellCompletion>
34-
- <doc:SwiftPMAsALibrary>
33+
- <doc:Plugins>
3534
- <doc:ModuleAliasing>
3635
- <doc:PackageCollections>
36+
- <doc:UsingShellCompletion>
37+
- <doc:SwiftPMAsALibrary>
3738

3839
<!-- ### Command Plugins -->
3940
<!-- placeholder for content about swift package manager extensions - command plugins -->

Sources/PackageManagerDocs/Documentation.docc/Package/PackagePlugin.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.6")
56
}
67

78

Sources/PackageManagerDocs/Documentation.docc/PackageCollections.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Package Collections
22

3+
@Metadata {
4+
@Available("Swift", introduced: "5.5")
5+
}
6+
37
Learn to create, publish and use Swift package collections.
48

59
## Overview
@@ -332,7 +336,7 @@ A signed package collection has an extra `signature` object:
332336
```
333337

334338
- The signature string (represented by `"<SIGNATURE>"`) is used to verify the contents of the collection file haven't been tampered with since it was signed when SwiftPM user [adds the collection](<doc:PackageCollectionAdd#Signed-package-collections>) to their configured list of collections. It includes the certificate's public key and chain.
335-
- `certificate` contains details extracted from the signing certificate. `subject.commonName` should be consistent with the name of the publisher so that it's recognizable by users. The root of the certificate must be [installed and trusted on users' machines](<doc:PackageCollectionAdd#trusted-root-certificates>).
339+
- `certificate` contains details extracted from the signing certificate. `subject.commonName` should be consistent with the name of the publisher so that it's recognizable by users. The root of the certificate must be [installed and trusted on users' machines](<doc:PackageCollectionAdd#Trusted-root-certificates>).
336340

337341
### Requirements on signing certificate
338342

@@ -349,7 +353,8 @@ Non-expired, non-revoked Swift Package Collection certificates from [developer.a
349353

350354
With the `package-collection-sign` tool, the root certificate provided as input for signing a collection is automatically trusted. When SwiftPM user tries to add the collection, however,
351355
the root certificate must either be preinstalled with the OS (Apple platforms only) or found in the `~/.swiftpm/config/trust-root-certs` directory (all platforms) or shipped with
352-
the [certificate-pinning configuration](<doc:#Protecting-package-collections>), otherwise the [signature check](<doc:PackageCollectionAdd#Signed-package-collections>) will fail. Collection publishers should make the DER-encoded
356+
the [certificate-pinning configuration](<doc:#Protecting-package-collections>), otherwise the [signature check](<doc:PackageCollectionAdd#Signed-package-collections>) will fail.
357+
Collection publishers should make the DER-encoded
353358
root certificate(s) that they use downloadable so that users can adjust their setup if needed.
354359

355360

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionAdd.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
Add a new collection.

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionDescribe.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
Get metadata for a collection or a package included in an imported collection.

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
List configured collections.

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionRefresh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
Refresh configured collections.

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionRemove.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
Remove a configured collection.

Sources/PackageManagerDocs/Documentation.docc/PackageCollections/PackageCollectionSearch.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.5")
56
}
67

78
Search for packages by keywords or module names.

Sources/PackageManagerDocs/Documentation.docc/PackageRegistry/PackageRegistryLogin.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@Metadata {
44
@PageImage(purpose: icon, source: command-icon)
5+
@Available("Swift", introduced: "5.9")
56
}
67

78
Log in to a registry.

0 commit comments

Comments
 (0)