Skip to content

Commit 6feffc6

Browse files
author
Victor Santos
committed
feat: add validation for INFISICAL_CLI_REPO_SIGNING_KEY_ID in APK and RPM uploads
- Added a check to ensure the INFISICAL_CLI_REPO_SIGNING_KEY_ID is set before uploading APK packages. - Removed redundant validation for RPM signing key ID, consolidating the check for both APK and RPM uploads.
1 parent 693e37b commit 6feffc6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

upload_to_cloudsmith.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ if ls *.apk 1> /dev/null 2>&1 && [ "$S3_ENABLED" = "true" ]; then
9999
echo "APK packages uploaded successfully"
100100
fi
101101

102+
# Validate signing key ID is configured
103+
if [ -z "$INFISICAL_CLI_REPO_SIGNING_KEY_ID" ]; then
104+
echo "Error: INFISICAL_CLI_REPO_SIGNING_KEY_ID not set"
105+
exit 1
106+
fi
107+
102108
for i in *.deb; do
103109
[ -f "$i" ] || break
104110
deb-s3 upload --bucket=$INFISICAL_CLI_S3_BUCKET --prefix=deb --visibility=private --sign=$INFISICAL_CLI_REPO_SIGNING_KEY_ID --preserve-versions $i
@@ -117,12 +123,6 @@ done
117123
# RPM - Upload to S3 and regenerate repo metadata
118124
# ============================================
119125
if [ "$S3_ENABLED" = "true" ]; then
120-
# Validate signing key ID is configured for RPM
121-
if [ -z "$INFISICAL_CLI_REPO_SIGNING_KEY_ID" ]; then
122-
echo "Error: INFISICAL_CLI_REPO_SIGNING_KEY_ID not set"
123-
exit 1
124-
fi
125-
126126
for i in *.rpm; do
127127
[ -f "$i" ] || break
128128

0 commit comments

Comments
 (0)