mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
ci: promote preview .deb to stable on release (#10846)
The current CI job expects the release to have the `.deb` files attached. Since writing that workflow, I've changed my mind on attaching the `.deb` files there. Instead, they are only uploaded to the repository. Without documentation on how to use them, these `.deb` files are unlikely to provide a good user experience. We change the job to instead promote the latest "preview` archives to the stable repo.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
# The `pool-` directories are referenced by the live repository metadata and the files in there need to atomically change with the metadata.
|
||||
|
||||
set -euo pipefail
|
||||
shopt -s globstar
|
||||
|
||||
COMPONENT="main"
|
||||
WORK_DIR="$(mktemp -d)"
|
||||
@@ -57,7 +58,11 @@ for DISTRIBUTION in "stable" "preview"; do
|
||||
if [ "$(ls -A "${IMPORT_DIR}")" ]; then
|
||||
echo "Normalizing package names..."
|
||||
|
||||
for deb in "${IMPORT_DIR}"/*.deb; do
|
||||
for deb in "${IMPORT_DIR}"/**; do
|
||||
if [[ ! "$deb" == *.deb ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -f "$deb" ]; then
|
||||
# Extract metadata from the .deb file
|
||||
PACKAGE=$(dpkg-deb -f "$deb" Package 2>/dev/null)
|
||||
@@ -85,7 +90,7 @@ for DISTRIBUTION in "stable" "preview"; do
|
||||
done
|
||||
|
||||
echo "Importing new packages..."
|
||||
mv --force --target-directory="${POOL_DIR}/" "${IMPORT_DIR}"/*.deb
|
||||
mv --force --target-directory="${POOL_DIR}/" "${IMPORT_DIR}"/**/*.deb
|
||||
fi
|
||||
|
||||
if [ -z "$(ls -A "${POOL_DIR}")" ]; then
|
||||
|
||||
Reference in New Issue
Block a user