Skip to content

Commit

Permalink
ci: fail more clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK authored Jan 31, 2023
1 parent 5454a6f commit 1e4b851
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,17 @@ jobs:
deploy-command: |
COMMAND='./gradlew --include-build ../publish-on-central createStagingRepositoryOnMavenCentral --parallel'
$(echo "$COMMAND") || $(echo "$COMMAND") || $(echo "$COMMAND")
[[ -e build/staging-repo-ids.properties ]]
[[ "$(wc -l build/staging-repo-ids.properties)" =~ "^1 .*" ]]
[[ "$(cat build/staging-repo-ids.properties)" =~ '^MavenCentral=[a-zA-Z]+-[0-9]+$' ]]
IDS="build/staging-repo-ids.properties"
# Check repo ids file existence
[[ -e "$IDS" ]] || (
echo "No $IDS" && exit 2
)
[[ "$(wc -l build/staging-repo-ids.properties)" =~ "^1 .*" ]] || (
echo "$IDS has too many lines (1 expected):\n$(cat "$IDS")" && exit 3
)
[[ "$(cat build/staging-repo-ids.properties)" =~ '^MavenCentral=[a-zA-Z]+-[0-9]+$' ]] || (
echo "$IDS has not the expected content:\n$(cat "$IDS")" && exit 4
)
working-directory: kt-mp-multi-stage
should-run-codecov: false
should-deploy: true
Expand Down

0 comments on commit 1e4b851

Please sign in to comment.