Skip to content

Commit 17c0d1b

Browse files
committed
download existing bucket rpm content and redo signing of metadata
1 parent a83e65c commit 17c0d1b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/publish-rpm-packages.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ for rpm_file in ${GORELEASER_PACKAGES_FOLDER}*_arm64.rpm; do
5252
fi
5353
done
5454

55-
# Download existing repository metadata if it exists
56-
printf "\n>>> Downloading existing repository metadata \n"
57-
aws s3 sync s3://${RPM_BUCKET_NAME}/${RPM_REPO_PATH}/ rpm-repo/ --endpoint-url "${AWS_ENDPOINT_URL}" --exclude "*" --include "*/repodata/*" || echo "No existing repository found, creating new one"
55+
# Download existing repository content (RPMs and metadata) if it exists
56+
printf "\n>>> Downloading existing repository content \n"
57+
aws s3 sync s3://${RPM_BUCKET_NAME}/${RPM_REPO_PATH}/ rpm-repo/ --endpoint-url "${AWS_ENDPOINT_URL}" --exclude "*.asc" || echo "No existing repository found, creating new one"
5858

5959
# Create repository metadata for each architecture
6060
printf "\n>>> Creating repository metadata \n"
@@ -70,6 +70,8 @@ for arch in x86_64 i386 aarch64; do
7070

7171
# Sign the repository metadata
7272
printf "Signing repository metadata for ${arch}...\n"
73+
# Remove existing signature file if it exists
74+
rm -f rpm-repo/${arch}/repodata/repomd.xml.asc
7375
gpg --batch --detach-sign --armor --local-user "${GPG_PRIVATE_KEY_FINGERPRINT}" --passphrase "${GPG_PASSPHRASE}" rpm-repo/${arch}/repodata/repomd.xml
7476

7577
# Verify the signature was created

0 commit comments

Comments
 (0)