|
14 | 14 | dir="$(dirname "$0")" |
15 | 15 |
|
16 | 16 | ciDir=.github |
17 | | -ciConfigRoot=/workflows/.gitaction.yml |
18 | | -ciConfig=$ciDir$ciConfigRoot |
19 | | -ciPRConfig=$ciDir/workflows/.gitaction-pr.yml |
| 17 | +ciSlugBuildMain=workflows/build-main.yml |
| 18 | +ciSlugBuildPR=workflows/build-pr.yml |
| 19 | +ciConfigBuildMain=$ciDir/$ciSlugBuildMain |
| 20 | +ciConfigBuildPR=$ciDir/$ciSlugBuildPR |
20 | 21 | ciSetupScript=$ciDir/setup.sh |
21 | 22 | ciBuildScript=$ciDir/build.sh |
22 | 23 | ciSettingsFile=$ciDir/settings.xml |
@@ -117,9 +118,9 @@ process() { |
117 | 118 | # -- GitHub Action sanity checks -- |
118 | 119 |
|
119 | 120 | test -e "$ciDir" -a ! -d "$ciDir" && die "$ciDir is not a directory" |
120 | | - test -e "$ciConfig" -a ! -f "$ciConfig" && die "$ciConfig is not a regular file" |
121 | | - test -e "$ciPRConfig" -a ! -f "$ciPRConfig" && die "$ciPRConfig is not a regular file" |
122 | | - test -e "$ciConfig" && warn "$ciConfig already exists" |
| 121 | + test -e "$ciConfigBuildMain" -a ! -f "$ciConfigBuildMain" && die "$ciConfigBuildMain is not a regular file" |
| 122 | + test -e "$ciConfigBuildPR" -a ! -f "$ciConfigBuildPR" && die "$ciConfigBuildPR is not a regular file" |
| 123 | + test -e "$ciConfigBuildMain" && warn "$ciConfigBuildMain already exists" |
123 | 124 | test -e "$ciBuildScript" && warn "$ciBuildScript already exists" |
124 | 125 | test -e "$ciSetupScript" && warn "$ciSetupScript already exists" |
125 | 126 |
|
@@ -170,7 +171,7 @@ jobs: |
170 | 171 | OSSRH_PASS: \${{ secrets.OSSRH_PASS }} |
171 | 172 | SIGNING_ASC: \${{ secrets.SIGNING_ASC }} |
172 | 173 | EOL |
173 | | - update "$ciConfig" "add/update main build action" |
| 174 | + update "$ciConfigBuildMain" "add/update main build action" |
174 | 175 |
|
175 | 176 | # Add/update the GitHub Actions PR configuration file. |
176 | 177 | cat >"$tmpFile" <<EOL |
@@ -210,7 +211,7 @@ jobs: |
210 | 211 | - name: Build with Maven |
211 | 212 | run: ./$ciBuildScript |
212 | 213 | EOL |
213 | | - update "$ciPRConfig" "add/update PR build action" |
| 214 | + update "$ciConfigBuildPR" "add/update PR build action" |
214 | 215 |
|
215 | 216 | # Add/update the GitHub Action setup script. |
216 | 217 | cat >"$tmpFile" <<EOL |
@@ -276,11 +277,11 @@ EOL |
276 | 277 | if grep -q "travis-ci.*svg" README.md >/dev/null 2>&1 |
277 | 278 | then |
278 | 279 | info "Updating README.md GitHub Action badge" |
279 | | - sed "s;travis-ci.*;$domain/$repoSlug/actions/$ciConfigRoot/badge.svg)](https://$domain/$repoSlug/actions$ciConfigRoot);g" README.md >"$tmpFile" |
| 280 | + sed "s;travis-ci.*;$domain/$repoSlug/actions/$ciSlugBuildMain/badge.svg)](https://$domain/$repoSlug/actions/$ciSlugBuildMain);g" README.md >"$tmpFile" |
280 | 281 | update README.md 'update README.md badge link' |
281 | 282 | else |
282 | 283 | info "Adding GitHub Action badge to README.md" |
283 | | - echo "[](https://$domain/$repoSlug/actions/$ciConfigRoot)" >"$tmpFile" |
| 284 | + echo "[](https://$domain/$repoSlug/actions/$ciSlugBuildMain)" >"$tmpFile" |
284 | 285 | echo >>"$tmpFile" |
285 | 286 | test -f README.md && cat README.md >>"$tmpFile" |
286 | 287 | update README.md 'add README.md badge link' |
|
0 commit comments