@@ -11,14 +11,15 @@ APT_BUCKET_NAME="stackit-cli-apt"
1111PUBLIC_KEY_BUCKET_NAME=" stackit-public-key"
1212PUBLIC_KEY_FILE=" key.gpg"
1313CUSTOM_KEYRING=" custom-keyring"
14+ DISTRIBUTION=" stackit"
1415APTLY_CONFIG_FILE_PATH=" ./.aptly.conf"
1516GORELEASER_PACKAGES_FOLDER=" dist/"
1617
1718# Create a local mirror of the current state of the remote APT repository
1819printf " >>> Creating mirror \n"
1920curl ${OBJECT_STORAGE_ENDPOINT} /${PUBLIC_KEY_BUCKET_NAME} /${PUBLIC_KEY_FILE} > public.asc
2021gpg --no-default-keyring --keyring ./${CUSTOM_KEYRING} .gpg --import public.asc
21- aptly mirror create -keyring=" ${CUSTOM_KEYRING} .gpg" current " ${OBJECT_STORAGE_ENDPOINT} /${APT_BUCKET_NAME} " stackit
22+ aptly mirror create -keyring=" ${CUSTOM_KEYRING} .gpg" current " ${OBJECT_STORAGE_ENDPOINT} /${APT_BUCKET_NAME} " ${DISTRIBUTION}
2223
2324# Update the mirror to the latest state
2425printf " \n>>> Updating mirror \n"
@@ -30,7 +31,7 @@ aptly snapshot create current-snapshot from mirror current
3031
3132# Create a new fresh local APT repo
3233printf " \n>>> Creating fresh local repo \n"
33- aptly repo create -distribution=" stackit-cli " new-repo
34+ aptly repo create -distribution=" ${DISTRIBUTION} " new-repo
3435
3536# Add new generated .deb packages to the new local repo
3637printf " \n>>> Adding new packages to local repo \n"
@@ -42,8 +43,8 @@ aptly snapshot create new-snapshot from repo new-repo
4243
4344# Merge new-snapshot into current-snapshot creating a new snapshot updated-snapshot
4445printf " \n>>> Merging snapshots \n"
45- aptly snapshot pull -no-remove -architectures=" amd64,i386,arm64" current-snapshot new-snapshot updated-snapshot stackit
46+ aptly snapshot pull -no-remove -architectures=" amd64,i386,arm64" current-snapshot new-snapshot updated-snapshot ${DISTRIBUTION}
4647
4748# Publish the new snapshot to the remote repo
4849printf " \n>>> Publishing updated snapshot \n"
49- aptly publish switch -gpg-key=" ${GPG_PRIVATE_KEY_ID} " -passphrase " ${GPG_PASSPHRASE} " -config " ${APTLY_CONFIG_FILE_PATH} " stackit " s3:${APT_BUCKET_NAME} :" updated-snapshot
50+ aptly publish switch -gpg-key=" ${GPG_PRIVATE_KEY_ID} " -passphrase " ${GPG_PASSPHRASE} " -config " ${APTLY_CONFIG_FILE_PATH} " ${DISTRIBUTION} " s3:${APT_BUCKET_NAME} :" updated-snapshot
0 commit comments