Skip to content

Commit 5eaa3b2

Browse files
committed
Fix error: Unknown subcommand or plugin name ‘generate-documentation’
1 parent 2dbe51b commit 5eaa3b2

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/Doc.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ on:
55
types:
66
- published
77
- edited
8+
push:
9+
branches:
10+
- 'main'
11+
paths:
12+
- '.github/workflows/Doc.yml'
813

914
permissions:
1015
contents: write
1116

1217
concurrency:
13-
group: ${{ github.ref }}
18+
group: ${{ github.workflow }}-${{ github.ref }}
1419
cancel-in-progress: true
1520

1621
jobs:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PACKAGE_PATHS := Package.swift
1515
commit:
1616
git add "$(file)"
1717
git commit -m "Commit via running $make $(file)" >/dev/null \
18-
&& echo "::notice:: make $(file)\n" \
18+
&& echo "::notice:: git commit $(file)\n" \
1919
|| true;
2020
touch "$(file)";
2121

@@ -36,6 +36,7 @@ Sources/%: Sources/%/Client.swift
3636
@$(MAKE) commit file="$@"
3737

3838
# Update openapi specification if needed
39+
.PHONY: Submodule
3940
Submodule:
4041
ifdef GITHUB_ACTIONS ## https://docs.github.com/en/actions/learn-github-actions/variables
4142
@touch "$(OPENAPI_PATH)"
@@ -56,5 +57,4 @@ $(PACKAGE_PATHS): $(SOURCE_DIRS)
5657
@$(MAKE) commit file="$@"
5758

5859
# Install
59-
.PHONY: Submodule
6060
install: Submodule .spi.yml

Scripts/PackageBuilder.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ struct PackageBuilder {
130130
// swift-tools-version: \#(version.rawValue)
131131
// The swift-tools-version declares the minimum version of Swift required to build this package.
132132
133+
import Foundation
133134
import PackageDescription
134135
135136
/// Generated via `$swift PackageBuilder.swift`
@@ -157,8 +158,14 @@ struct PackageBuilder {
157158
)
158159
]
159160
)
160-
161-
161+
162+
// swift-docc is not needed for package users
163+
if ProcessInfo.processInfo.environment["ENABLE_DOCC_SUPPORT"] == "1" {
164+
package.dependencies += [
165+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
166+
]
167+
}
168+
162169
"""#
163170
}
164171
func write() throws {

0 commit comments

Comments
 (0)