File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CocoaPods
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ paths :
7
+ - ' .github/workflows/cocoapods2.yml'
8
+ pull_request :
9
+ branches : [ main ]
10
+ paths :
11
+ - ' .github/workflows/cocoapods2.yml'
12
+
13
+ jobs :
14
+ pod-lib-lint-subspecs :
15
+ name : CocoaPods lib lint SubSpecs
16
+ runs-on : macos-15
17
+ strategy :
18
+ fail-fast : false
19
+ matrix :
20
+ pod_configuration : ["Debug", "Release"]
21
+ num_chunks : ["3"]
22
+ chunk : ["1", "2", "3"]
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ - name : " macOS"
26
+ run : |
27
+ set -eu
28
+
29
+ SUBSPECS=$(sed -n -e 's/[^'']*subspec ''\([^'']*\).*/\1/p' GoogleAPIClientForREST.podspec)
30
+ NUM_SUBSPECS=$(echo "${SUBSPECS} | wc -l)
31
+ LINES_PER_CHUNK=$((NUM_SUBSPECS / ${{ matrix.num_chunks }}))
32
+ START_LINE=$(( (${{ matrix.chunk }} - 1) * LINES_PER_CHUNK + 1 ))
33
+ END_LINE=$(( ${{ matrix.chunk }} * LINES_PER_CHUNK ))
34
+
35
+ if [ "${{ matrix.chunk }}" -eq "${{ matrix.num_chunks }}" ]; then
36
+ SED_PATTERN="${START_LINE},$p"
37
+ else
38
+ SED_PATTERN="${START_LINE},${END_LINE}p""
39
+ fi
40
+
41
+ echo "${SUBSPECS} | sed -n ${SED_PATTERN}
You can’t perform that action at this time.
0 commit comments