Skip to content

Commit cc948d4

Browse files
committed
Update document lane.
1 parent fdfa1d0 commit cc948d4

File tree

8 files changed

+90
-88
lines changed

8 files changed

+90
-88
lines changed

.github/DISCUSSION_TEMPLATE/q-a.yml

-20
This file was deleted.

.github/FUNDING.yml

-3
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

-22
This file was deleted.

.github/workflows/release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
jobs:
7+
build:
8+
runs-on: macos-15
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Select Xcode version
12+
run: sudo xcode-select -s '/Applications/Xcode_16.2.app'
13+
- name: Setup SSH
14+
run: |
15+
mkdir -p ~/.ssh
16+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
17+
chmod 600 ~/.ssh/id_rsa
18+
ssh-keyscan github.com >> ~/.ssh/known_hosts
19+
- name: bundle exec fastlane document
20+
env:
21+
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: |
23+
bundle install
24+
bundle exec fastlane document version:${{ github.ref_name }}

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://rubygems.org'
22

33
gem 'cocoapods'
44
gem 'fastlane'
5-
gem 'synx'
5+
gem 'rubocop'
66
gem 'danger'
77
gem 'danger-privacymanifest', git: 'https://github.com/shogo4405/danger-privacymanifest'

Gemfile.lock

+27-7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ GEM
3131
httpclient (~> 2.8, >= 2.8.3)
3232
json (>= 1.5.1)
3333
artifactory (3.0.17)
34+
ast (2.4.3)
3435
atomos (0.1.3)
3536
aws-eventstream (1.3.2)
3637
aws-partitions (1.1089.0)
@@ -59,7 +60,6 @@ GEM
5960
cork
6061
nap
6162
open4 (~> 1.3)
62-
clamp (0.6.5)
6363
cocoapods (1.16.2)
6464
addressable (~> 2.8)
6565
claide (>= 1.0.2, < 2.0)
@@ -99,7 +99,6 @@ GEM
9999
cocoapods-try (1.2.0)
100100
colored (1.2)
101101
colored2 (3.1.2)
102-
colorize (0.8.1)
103102
commander (4.6.0)
104103
highline (~> 2.0.0)
105104
concurrent-ruby (1.3.5)
@@ -266,6 +265,8 @@ GEM
266265
rexml (>= 3.3.9)
267266
kramdown-parser-gfm (1.1.0)
268267
kramdown (~> 2.0)
268+
language_server-protocol (3.17.0.4)
269+
lint_roller (1.1.0)
269270
logger (1.7.0)
270271
mini_magick (4.13.2)
271272
mini_mime (1.1.5)
@@ -285,19 +286,42 @@ GEM
285286
open4 (1.3.4)
286287
optparse (0.6.0)
287288
os (1.1.4)
289+
parallel (1.27.0)
290+
parser (3.3.8.0)
291+
ast (~> 2.4.1)
292+
racc
288293
plist (3.7.2)
294+
prism (1.4.0)
289295
pstore (0.2.0)
290296
public_suffix (4.0.7)
297+
racc (1.8.1)
298+
rainbow (3.1.1)
291299
rake (13.2.1)
292300
rchardet (1.9.0)
301+
regexp_parser (2.10.0)
293302
representable (3.2.0)
294303
declarative (< 0.1.0)
295304
trailblazer-option (>= 0.1.1, < 0.2.0)
296305
uber (< 0.2.0)
297306
retriable (3.1.2)
298307
rexml (3.4.1)
299308
rouge (3.28.0)
309+
rubocop (1.75.4)
310+
json (~> 2.3)
311+
language_server-protocol (~> 3.17.0.2)
312+
lint_roller (~> 1.1.0)
313+
parallel (~> 1.10)
314+
parser (>= 3.3.0.2)
315+
rainbow (>= 2.2.2, < 4.0)
316+
regexp_parser (>= 2.9.3, < 3.0)
317+
rubocop-ast (>= 1.44.0, < 2.0)
318+
ruby-progressbar (~> 1.7)
319+
unicode-display_width (>= 2.4.0, < 4.0)
320+
rubocop-ast (1.44.1)
321+
parser (>= 3.3.7.2)
322+
prism (~> 1.4)
300323
ruby-macho (2.5.1)
324+
ruby-progressbar (1.13.0)
301325
ruby2_keywords (0.0.5)
302326
rubyzip (2.4.1)
303327
sawyer (0.9.2)
@@ -313,10 +337,6 @@ GEM
313337
simctl (1.6.10)
314338
CFPropertyList
315339
naturally
316-
synx (0.2.1)
317-
clamp (~> 0.6)
318-
colorize (~> 0.7)
319-
xcodeproj (~> 1.0)
320340
sysrandom (1.0.5)
321341
terminal-notifier (2.0.0)
322342
terminal-table (3.0.2)
@@ -353,7 +373,7 @@ DEPENDENCIES
353373
danger
354374
danger-privacymanifest!
355375
fastlane
356-
synx
376+
rubocop
357377

358378
BUNDLED WITH
359379
2.2.33

fastlane/Fastfile

+37-34
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,63 @@
1-
# This file contains the fastlane.tools configuration
2-
# You can find the documentation at https://docs.fastlane.tools
3-
#
4-
# For a list of all available actions, check out
5-
#
6-
# https://docs.fastlane.tools/actions
7-
#
8-
# For a list of all available plugins, check out
9-
#
10-
# https://docs.fastlane.tools/plugins/available-plugins
11-
#
12-
13-
# Uncomment the line if you want fastlane to automatically update itself
14-
# update_fastlane
15-
16-
desc "[CI] Review PullRequest."
1+
desc 'Review PullRequest.'
172
lane :review do
183
spm(
19-
command: "test",
20-
package_path: "HaishinKit",
4+
command: 'test',
5+
package_path: 'HaishinKit'
216
)
227
spm(
23-
command: "test",
24-
package_path: "SRTHaishinKit",
8+
command: 'test',
9+
package_path: 'SRTHaishinKit'
2510
)
2611
begin
2712
danger(
2813
danger_id: 'danger',
2914
dangerfile: 'Dangerfile',
3015
verbose: true
3116
)
32-
rescue
17+
rescue StandardError
3318
end
3419
end
3520

36-
desc "Creates documents."
21+
desc 'Creates documents.'
3722
lane :document do |options|
38-
if options[:version] == ""
39-
UI.error("Version is a required argument!")
23+
if options[:version] == ''
24+
UI.error('Version is a required argument!')
4025
next
4126
end
4227

4328
version = options[:version]
4429

45-
sh "rm -rf ../../docs.haishinkit.com/swift/#{version}"
46-
sh <<COMMAND
47-
swift package --allow-writing-to-directory ../../docs.haishinkit.com/ generate-documentation --hosting-base-path swift/#{version}\
48-
--output-path ../../docs.haishinkit.com/swift/#{version}\
30+
Dir.chdir('..') do
31+
sh 'git clone [email protected]:HaishinKit/docs.haishinkit.com.git'
32+
33+
if Helper.is_ci?
34+
sh "git config --global user.email '[email protected]'"
35+
sh "git config --global user.name 'GitHub Action'"
36+
end
37+
38+
sh "rm -rf ./docs.haishinkit.com/swift/#{version}"
39+
sh <<COMMAND
40+
swift package --allow-writing-to-directory ./docs.haishinkit.com/ generate-documentation --hosting-base-path swift/#{version}\
41+
--output-path ./docs.haishinkit.com/swift/#{version}\
4942
--transform-for-static-hosting\
50-
--enable-experimental-combined-documentation
43+
--enable-experimental-combined-documentation
5144
COMMAND
5245

53-
sh "rm -rf ../../docs.haishinkit.com/swift/latest"
54-
sh <<COMMAND
55-
swift package --allow-writing-to-directory ../../docs.haishinkit.com/ generate-documentation --hosting-base-path swift/latest\
56-
--output-path ../../docs.haishinkit.com/swift/latest\
46+
sh 'rm -rf ./docs.haishinkit.com/swift/latest'
47+
sh <<COMMAND
48+
swift package --allow-writing-to-directory ./docs.haishinkit.com/ generate-documentation --hosting-base-path swift/latest\
49+
--output-path ./docs.haishinkit.com/swift/latest\
5750
--transform-for-static-hosting\
58-
--enable-experimental-combined-documentation
51+
--enable-experimental-combined-documentation
5952
COMMAND
53+
end
54+
55+
Dir.chdir('../docs.haishinkit.com') do
56+
sh 'git add .'
57+
sh "git commit -m 'Add HaishinKit.kt #{version}'"
58+
sh 'git push origin main'
59+
end
60+
61+
sh 'rm -rf ../docs'
62+
sh 'rm -rf ../docs.haishinkit.com'
6063
end

fastlane/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
1919
[bundle exec] fastlane review
2020
```
2121

22-
[CI] Review PullRequest.
22+
Review PullRequest.
2323

2424
### document
2525

0 commit comments

Comments
 (0)