Skip to content

Commit a5fa503

Browse files
authored
Fix the replacement of Cookiecutter parameters (#19)
* Update `Makefile` * Update templates * Update `CHANGELOG.md` * Update `generate.yml` * Update dependencies * Update `ci.yml` * Fix a typo
1 parent e2771de commit a5fa503

6 files changed

Lines changed: 125 additions & 90 deletions

File tree

.github/workflows/generate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push]
44

55
jobs:
66
test:
7-
runs-on: macos-12
7+
runs-on: macos-14
88
env:
99
MINT_PATH: "~/mint_cache"
1010

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [Unreleased]
4+
#### 1.x Releases
5+
- `1.2.x` Releases - [1.2.0](#120)
6+
- `1.1.x` Releases - [1.1.0](#110) | [1.1.1](#111)
7+
- `1.0.x` Releases - [1.0.0](#100)
8+
9+
## [1.2.0](https://github.com/space-code/package-template/releases/tag/1.2.0)
10+
Released on 2025-04-20
511

612
## Added
713
- Add the `Dependapot` action
@@ -27,9 +33,9 @@ All notable changes to this project will be documented in this file.
2733
- Update the `post_get_project` script
2834
- Updated in Pull Request [#14](https://github.com/space-code/package-template/pull/14).
2935

30-
#### 1.x Releases
31-
- `1.1.x` Releases - [1.1.0](#110) | [1.1.1](#111)
32-
- `1.0.x` Releases - [1.0.0](#100)
36+
## Fixed
37+
- Fix the replacement of Cookiecutter parameters.
38+
- Fixed in Pull Request [#19](https://github.com/space-code/package-template/pull/19).
3339

3440
## [1.1.1](https://github.com/space-code/package-template/releases/tag/1.1.1)
3541
Released on 2023-12-18

{{ cookiecutter.name | lower }}/.github/workflows/ci.yml

Lines changed: 109 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -17,82 +17,92 @@ jobs:
1717
SwiftLint:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: GitHub Action for SwiftLint
2222
uses: norio-nomura/action-swiftlint@3.2.1
2323
with:
2424
args: --strict
2525
env:
26-
{% raw %}
26+
{%- raw %}
2727
DIFF_BASE: ${{ github.base_ref }}
28-
{% endraw %}
28+
{%- endraw %}
2929

30-
{% if cookiecutter.macOS == "Yes" %}
30+
{%- if cookiecutter.macOS == "Yes" %}
3131
macOS:
32-
{% raw %}
32+
{%- raw %}
3333
name: ${{ matrix.name }}
3434
runs-on: ${{ matrix.runsOn }}
35-
{% endraw %}
35+
{%- endraw %}
3636
env:
37-
{% raw %}
37+
{%- raw %}
3838
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
39-
{% endraw %}
39+
{%- endraw %}
4040
timeout-minutes: 20
4141
strategy:
4242
fail-fast: false
4343
matrix:
4444
include:
45+
- xcode: "Xcode_16.1"
46+
runsOn: macOS-14
47+
name: "macOS 14, Xcode 16.1, Swift 6.0.2"
48+
- xcode: "Xcode_15.4"
49+
runsOn: macOS-14
50+
name: "macOS 14, Xcode 15.4, Swift 5.10"
51+
- xcode: "Xcode_15.0"
52+
runsOn: macos-13
4553
- xcode: "Xcode_15.0"
4654
runsOn: macos-13
4755
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
4856
- xcode: "Xcode_14.3.1"
4957
runsOn: macos-13
5058
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0"
51-
- xcode: "Xcode_14.2"
52-
runsOn: macOS-12
53-
name: "macOS 12, Xcode 14.2, Swift 5.7.2"
54-
- xcode: "Xcode_14.1"
55-
runsOn: macOS-12
56-
name: "macOS 12, Xcode 14.1, Swift 5.7.1"
5759
steps:
58-
- uses: actions/checkout@v3
59-
{% raw %}
60+
- uses: actions/checkout@v4
61+
{%- raw %}
6062
- name: ${{ matrix.name }}
61-
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
62-
{% endraw %}
63+
{%- endraw %}
64+
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
6365
- name: Upload coverage reports to Codecov
6466
uses: codecov/codecov-action@v3.1.0
6567
with:
66-
{% raw %}
68+
{%- raw %}
6769
token: ${{ secrets.CODECOV_TOKEN }}
68-
{% endraw %}
70+
{%- endraw %}
6971
xcode: true
70-
{% raw %}
72+
{%- raw %}
7173
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
72-
{% endraw %}
74+
{%- endraw %}
7375
- uses: actions/upload-artifact@v4
7476
with:
75-
{% raw %}
77+
{%- raw %}
7678
name: ${{ matrix.name }}
77-
{% endraw %}
79+
{%- endraw %}
7880
path: test_output
79-
{% endif %}
81+
{%- endif %}
8082

81-
{% if cookiecutter.ios == "Yes" %}
83+
{%- if cookiecutter.ios == "Yes" %}
8284
iOS:
83-
{% raw %}
85+
{%- raw %}
8486
name: ${{ matrix.name }}
8587
runs-on: ${{ matrix.runsOn }}
86-
{% endraw %}
88+
{%- endraw %}
8789
env:
88-
{% raw %}
90+
{%- raw %}
8991
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
90-
{% endraw %}
92+
{%- endraw %}
9193
timeout-minutes: 20
9294
strategy:
9395
fail-fast: false
9496
matrix:
9597
include:
98+
- destination: "OS=18.1,name=iPhone 16 Pro"
99+
name: "iOS 18.1"
100+
xcode: "Xcode_16.1"
101+
runsOn: macOS-14
102+
- destination: "OS=17.5,name=iPhone 15 Pro"
103+
name: "iOS 17.5"
104+
xcode: "Xcode_15.4"
105+
runsOn: macOS-14
96106
- destination: "OS=17.0.1,name=iPhone 14 Pro"
97107
name: "iOS 17.0.1"
98108
xcode: "Xcode_15.0"
@@ -102,34 +112,42 @@ jobs:
102112
xcode: "Xcode_14.3.1"
103113
runsOn: macos-13
104114
steps:
105-
- uses: actions/checkout@v3
106-
{% raw %}
115+
- uses: actions/checkout@v4
116+
{%- raw %}
107117
- name: ${{ matrix.name }}
108-
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
109-
{% endraw %}
118+
{%- endraw %}
119+
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ '{{ matrix.destination }}' }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
110120
- uses: actions/upload-artifact@v4
111121
with:
112-
{% raw %}
122+
{%- raw %}
113123
name: ${{ matrix.name }}
114124
path: test_output
115-
{% endraw %}
116-
{% endif %}
125+
{%- endraw %}
126+
{%- endif %}
117127

118-
{% if cookiecutter.tvOS == "Yes" %}
128+
{%- if cookiecutter.tvOS == "Yes" %}
119129
tvOS:
120-
{% raw %}
130+
{%- raw %}
121131
name: ${{ matrix.name }}
122132
runs-on: ${{ matrix.runsOn }}
123-
{% endraw %}
133+
{%- endraw %}
124134
env:
125-
{% raw %}
135+
{%- raw %}
126136
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
127-
{% endraw %}
137+
{%- endraw %}
128138
timeout-minutes: 20
129139
strategy:
130140
fail-fast: false
131141
matrix:
132142
include:
143+
- destination: "OS=18.1,name=Apple TV"
144+
name: "tvOS 18.1"
145+
xcode: "Xcode_16.1"
146+
runsOn: macOS-14
147+
- destination: "OS=17.5,name=Apple TV"
148+
name: "tvOS 17.5"
149+
xcode: "Xcode_15.4"
150+
runsOn: macOS-14
133151
- destination: "OS=17.0,name=Apple TV"
134152
name: "tvOS 17.0"
135153
xcode: "Xcode_15.0"
@@ -139,44 +157,52 @@ jobs:
139157
xcode: "Xcode_14.3.1"
140158
runsOn: macos-13
141159
steps:
142-
- uses: actions/checkout@v3
143-
{% raw %}
160+
- uses: actions/checkout@v4
161+
{%- raw %}
144162
- name: ${{ matrix.name }}
145-
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
146-
{% endraw %}
163+
{%- endraw %}
164+
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination ${{ '{{ matrix.destination }}' }} clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
147165
- name: Upload coverage reports to Codecov
148166
uses: codecov/codecov-action@v3.1.0
149167
with:
150-
{% raw %}
168+
{%- raw %}
151169
token: ${{ secrets.CODECOV_TOKEN }}
152-
{% endraw %}
170+
{%- endraw %}
153171
xcode: true
154-
{% raw %}
172+
{%- raw %}
155173
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
156-
{% endraw %}
174+
{%- endraw %}
157175
- uses: actions/upload-artifact@v4
158176
with:
159-
{% raw %}
177+
{%- raw %}
160178
name: ${{ matrix.name }}
161-
{% endraw %}
179+
{%- endraw %}
162180
path: test_output
163-
{% endif %}
181+
{%- endif %}
164182

165-
{% if cookiecutter.watchOS == "Yes" %}
183+
{%- if cookiecutter.watchOS == "Yes" %}
166184
watchOS:
167-
{% raw %}
185+
{%- raw %}
168186
name: ${{ matrix.name }}
169187
runs-on: ${{ matrix.runsOn }}
170-
{% endraw %}
188+
{%- endraw %}
171189
env:
172-
{% raw %}
190+
{%- raw %}
173191
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
174-
{% endraw %}
192+
{%- endraw %}
175193
timeout-minutes: 20
176194
strategy:
177195
fail-fast: false
178196
matrix:
179197
include:
198+
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
199+
name: "watchOS 11.1"
200+
xcode: "Xcode_16.1"
201+
runsOn: macOS-14
202+
- destination: "OS=10.5,name=Apple Watch Series 9 (45mm)"
203+
name: "watchOS 10.5"
204+
xcode: "Xcode_15.4"
205+
runsOn: macOS-14
180206
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
181207
name: "watchOS 10.0"
182208
xcode: "Xcode_15.0"
@@ -190,55 +216,58 @@ jobs:
190216
xcode: "Xcode_14.3.1"
191217
runsOn: macos-13
192218
steps:
193-
- uses: actions/checkout@v3
194-
{% raw %}
219+
- uses: actions/checkout@v4
220+
{%- raw %}
195221
- name: ${{ matrix.name }}
196-
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
197-
{% endraw %}
222+
{%- endraw %}
223+
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ '{{ matrix.destination }}' }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
198224
- name: Upload coverage reports to Codecov
199225
uses: codecov/codecov-action@v3.1.0
200226
with:
201-
{% raw %}
227+
{%- raw %}
202228
token: ${{ secrets.CODECOV_TOKEN }}
203-
{% endraw %}
229+
{%- endraw %}
204230
xcode: true
205-
{% raw %}
231+
{%- raw %}
206232
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
207-
{% endraw %}
233+
{%- endraw %}
208234
- uses: actions/upload-artifact@v4
209235
with:
210-
{% raw %}
236+
{%- raw %}
211237
name: ${{ matrix.name }}
212-
{% endraw %}
238+
{%- endraw %}
213239
path: test_output
214-
{% endif %}
240+
{%- endif %}
215241

216242
spm:
217-
{% raw %}
243+
{%- raw %}
218244
name: ${{ matrix.name }}
219245
runs-on: ${{ matrix.runsOn }}
220-
{% endraw %}
246+
{%- endraw %}
221247
env:
222-
{% raw %}
248+
{%- raw %}
223249
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
224-
{% endraw %}
250+
{%- endraw %}
225251
timeout-minutes: 20
226252
strategy:
227253
fail-fast: false
228254
matrix:
229255
include:
230-
- name: "Xcode 15"
256+
- name: "macOS 14, SPM 6.0.2 Test"
257+
xcode: "Xcode_16.1"
258+
runsOn: macOS-14
259+
- name: "macOS 14, SPM 5.9.0 Test"
231260
xcode: "Xcode_15.0"
232-
runsOn: macos-13
233-
- name: "Xcode 14"
261+
runsOn: macos-14
262+
- name: "macOS 13, SPM 5.8.1 Test"
234263
xcode: "Xcode_14.3.1"
235264
runsOn: macos-13
236265
steps:
237266
- uses: actions/checkout@v3
238-
{% raw %}
267+
{%- raw %}
239268
- name: ${{ matrix.name }}
269+
{%- endraw %}
240270
run: swift build -c release --target "{{ cookiecutter.name }}"
241-
{% endraw %}
242271
merge-test-reports:
243272
needs: [iOS, macOS, watchOS, tvOS]
244273
runs-on: macos-13
@@ -256,11 +285,11 @@ jobs:
256285

257286
discover-typos:
258287
name: Discover Typos
259-
runs-on: macOS-12
288+
runs-on: macOS-13
260289
env:
261290
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
262291
steps:
263-
- uses: actions/checkout@v2
292+
- uses: actions/checkout@v4
264293
- name: Discover typos
265294
run: |
266295
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"

{{ cookiecutter.name | lower }}/.github/workflows/danger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
bundle install --clean --path vendor/bundle
2626
- name: danger
2727
env:
28-
{% raw %}
28+
{%- raw %}
2929
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
30-
{% endraw %}
30+
{%- endraw %}
3131
run: bundle exec danger --verbose

{{ cookiecutter.name | lower }}/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ bootstrap: hook
44
mint bootstrap
55

66
hook:
7-
ln -sf .git/hooks/pre-commit ../../hooks/pre-commit
7+
ln -sf ../../hooks/pre-commit .git/hooks/pre-commitg
88
chmod +x .git/hooks/pre-commit
99

1010
mint:

0 commit comments

Comments
 (0)