Skip to content

Commit 47eca82

Browse files
committed
Refine Gradle and CI workflows for improved variable usage and error handling
1 parent 402df72 commit 47eca82

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ jobs:
7070
run: |
7171
set -euo pipefail
7272
73-
if [[ ! -f build/jreleaser/output.properties ]]; then
74-
echo "::error title=File Missing::The file 'build/jreleaser/output.properties' does not exist."
73+
OUTPUT_PROPS="build/jreleaser/output.properties"
74+
75+
if [[ ! -f "$OUTPUT_PROPS" ]]; then
76+
echo "::error title=File Missing::The file '$OUTPUT_PROPS' does not exist."
7577
exit 1
7678
fi
7779
78-
DEPLOY_ID=$(grep '^deploymentId=' build/jreleaser/output.properties | cut -d= -f2 || true)
80+
DEPLOY_ID=$(grep '^deploymentId=' "$OUTPUT_PROPS" | cut -d= -f2 || true)
7981
if [[ -z "$DEPLOY_ID" ]]; then
80-
echo "::error title=Missing Deployment ID::The 'deploymentId' key was not found in 'build/jreleaser/output.properties'."
82+
echo "::error title=Missing Deployment ID::The 'deploymentId' key was not found in '$OUTPUT_PROPS'."
8183
exit 1
8284
fi
8385
@@ -86,7 +88,7 @@ jobs:
8688
AUTH=$(printf "%s:%s" "$OSSRH_USERNAME" "$OSSRH_TOKEN" | base64)
8789
echo "::add-mask::$AUTH"
8890
89-
STATUS_JSON=$(curl -s \
91+
STATUS_JSON=$(curl -sS \
9092
-H "Authorization: Bearer $AUTH" \
9193
-H "Content-Type: application/json" \
9294
-X POST \

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ publishing {
4040

4141
jreleaser {
4242
gitRootSearch = true
43-
strict= true
43+
strict = true
4444

4545
signing {
4646
active = Active.ALWAYS

0 commit comments

Comments
 (0)