Skip to content

Commit 6a78c2b

Browse files
authored
Merge pull request #8 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-6d0981c
Bump Submodule/github/rest-api-description from `e72f353` to `6d0981c`
2 parents 4fdb2b9 + 1da524b commit 6a78c2b

File tree

31 files changed

+1057
-1056
lines changed

31 files changed

+1057
-1056
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os:
1818
- ubuntu-latest
19-
- macos-latest
19+
# - macos-latest
2020
swift: ["5.9"]
2121
runs-on: ${{ matrix.os }}
2222
timeout-minutes: 30

.github/workflows/Dependabot.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ jobs:
1515
strategy:
1616
matrix:
1717
os:
18-
- ubuntu-latest
19-
# - macos-latest
18+
# - ubuntu-latest
19+
- macos-latest
2020
swift: ["5.9"]
2121
runs-on: ${{ matrix.os }}
22+
timeout-minutes: 60
2223
steps:
2324
- uses: actions/checkout@v4
2425
with:
@@ -27,16 +28,16 @@ jobs:
2728
with:
2829
swift: ${{ matrix.swift }}
2930
os: ${{ matrix.os }}
30-
- run: |
31-
git config user.name "${GITHUB_ACTOR}"
32-
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
33-
- run: touch Submodule
34-
- run: make install
35-
- run: git push
36-
- env:
31+
- name: "Sync code base"
32+
env:
3733
PR_URL: ${{github.event.pull_request.html_url}}
3834
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3935
run: |
40-
gh pr review --approve "$PR_URL"
41-
gh pr merge --auto --merge "$PR_URL"
36+
gh pr checkout ${{ github.event.pull_request.number }}
37+
git config user.name "${GITHUB_ACTOR}"
38+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
39+
make install
40+
git push
41+
# gh pr review --approve "$PR_URL"
42+
# gh pr merge --auto --merge "$PR_URL"
4243

.github/workflows/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
with:
1616
swift-version: ${{ inputs.swift }}
1717
- uses: irgaly/setup-mint@v1
18-
- uses: chrisdickinson/setup-yq@latest
18+
- uses: dcarbone/install-yq[email protected]
1919

2020
# - name: "Xcode Cache"
2121
# if: contains(inputs.os, 'macos')

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
# Special-Targets #
88
# https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
99
.DEFAULT_GOAL := install
10-
OPENAPI_PATH := Submodule/github/rest-api-description/descriptions/api.github.com/api.github.com.yaml
11-
.SECONDARY: $(%.yml)
10+
OPENAPI_PATH := Submodule/github/rest-api-description/descriptions/api.github.com/api.github.com.yaml
11+
TAG_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH))
12+
SUBDIRS := $(addprefix Sources/, $(TAG_NAMES))
13+
SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS))
14+
.SECONDARY : $(%.yml)
1215

1316
%/openapi.yml: $(OPENAPI_PATH)
1417
@mkdir -p "$(@D)"
1518
@ln -sf ../../$(OPENAPI_PATH) $@
1619
@git add $@
1720
@echo "::debug:: make $@"
1821

19-
TAG_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH))
20-
SUBDIRS := $(addprefix Sources/, $(TAG_NAMES))
21-
OPENAPI_CONFIG_FILES := $(addsuffix /openapi-generator-config.yml, $(SUBDIRS))
2222
%/openapi-generator-config.yml: $(OPENAPI_PATH)
2323
@mkdir -p "$(@D)"
2424
@tag_name=$(shell basename $(shell dirname $@)); \
@@ -35,24 +35,24 @@ OPENAPI_CONFIG_FILES := $(addsuffix /openapi-generator-config.yml, $(SUBDIRS))
3535
@git add $@
3636
@echo "::debug:: make $@"
3737

38-
SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS))
3938
%/Client.swift: %/openapi.yml %/openapi-generator-config.yml
4039
mint run apple/swift-openapi-generator generate $(@D)/openapi.yml \
4140
--config $(@D)/openapi-generator-config.yml \
4241
--output-directory $(@D)
4342
@git add $(@D)
44-
@git commit -m "[Make] Sync *.swift" >/dev/null \
43+
@git commit -m "[Make] Generate $(@D)/*.swift" >/dev/null \
4544
&& echo "::notice:: make $@" \
4645
|| true
4746

4847
.PHONY: install-$(OPENAPI_PATH)
4948
install-$(OPENAPI_PATH):
5049
ifdef GITHUB_ACTIONS ## https://docs.github.com/en/actions/learn-github-actions/variables
50+
@touch $(OPENAPI_PATH)
5151
@echo "::notice:: make $@"
5252
else
5353
git submodule update --recursive --remote
5454
@git add Submodule
55-
@git commit -m "[Make]$$(git submodule status Submodule/github/rest-api-description)" >/dev/null \
55+
@git commit -m "[Make] Bump$$(git submodule status Submodule/github/rest-api-description)" >/dev/null \
5656
&& touch $(OPENAPI_PATH) \
5757
&& echo "::notice:: make $@" \
5858
|| true
@@ -61,22 +61,22 @@ endif
6161
install: install-$(OPENAPI_PATH) $(SWIFT_FILES)
6262
@echo "::notice:: make $@"
6363

64-
XCFrameworks:
65-
mint run giginet/Scipio create . \
66-
--static \
67-
--embed-debug-symbols \
68-
--support-simulators
69-
@touch $@
70-
@echo "::notice:: make $@"
71-
72-
%.zip: %.xcframework
73-
@zip -qr "$@" "$<"
74-
@rm -rf "$<"
75-
@git add "$@"
76-
@echo "::debug:: make $@"
77-
78-
install-zips: XCFrameworks
79-
@$(MAKE) $(shell echo XCFrameworks/*.xcframework | sed 's/\.xcframework/\.zip/g');
64+
# XCFrameworks:
65+
# mint run giginet/Scipio create . \
66+
# --static \
67+
# --embed-debug-symbols \
68+
# --support-simulators
69+
# @touch $@
70+
# @echo "::notice:: make $@"
71+
#
72+
# %.zip: %.xcframework
73+
# @zip -qr "$@" "$<"
74+
# @rm -rf "$<"
75+
# @git add "$@"
76+
# @echo "::debug:: make $@"
77+
#
78+
# install-zips: XCFrameworks
79+
# @$(MAKE) $(shell echo XCFrameworks/*.xcframework | sed 's/\.xcframework/\.zip/g');
8080
# @git commit -m "[Make] Modify xcframework zips" || true
8181
# @echo "::notice:: make $@"
8282

@@ -87,12 +87,12 @@ update-to-date:
8787
touch Sources/**/openapi.yml
8888
touch Sources/**/Client.swift
8989

90-
docs: ## Need env GITHUB_PAGES is created as 'true'
91-
swift package --allow-writing-to-directory $@ generate-documentation \
92-
--disable-indexing \
93-
--transform-for-static-hosting \
94-
--hosting-base-path github-rest-api-swift-openapi;
95-
sh Script/setupDocsHtml.sh
90+
# docs: ## Need env GITHUB_PAGES is created as 'true'
91+
# swift package --allow-writing-to-directory $@ generate-documentation \
92+
# --disable-indexing \
93+
# --transform-for-static-hosting \
94+
# --hosting-base-path github-rest-api-swift-openapi;
95+
# sh Script/setupDocsHtml.sh
9696

9797
.PHONY: help
9898
.SILENT: help

0 commit comments

Comments
 (0)