Skip to content

Commit

Permalink
packaging: skip empty repos
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens committed Jan 27, 2025
1 parent fb57c6b commit f5d9a66
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packaging/update-apt-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ count=$(find "$REPO_DIR" -maxdepth 1 -type f -name "*.deb" | wc -l)
if [[ $count != 0 ]] ; then
# Do not remove files as we need them from moving to staging-release
aptly -config="$APTLY_CONFIG" repo add -force-replace "$APTLY_REPO_NAME" "$REPO_DIR/"
else
echo "WARNING: no files to add in $DEB_REPO for $CODENAME"
fi
aptly -config="$APTLY_CONFIG" repo show "$APTLY_REPO_NAME"
aptly -config="$APTLY_CONFIG" repo show "$APTLY_REPO_NAME"

if [[ "$DISABLE_SIGNING" != "true" ]]; then
aptly -config="$APTLY_CONFIG" publish repo -gpg-key="$GPG_KEY" -origin="$APTLY_ORIGIN" -label="$APTLY_LABEL" "$APTLY_REPO_NAME"
if [[ "$DISABLE_SIGNING" != "true" ]]; then
aptly -config="$APTLY_CONFIG" publish repo -gpg-key="$GPG_KEY" -origin="$APTLY_ORIGIN" -label="$APTLY_LABEL" "$APTLY_REPO_NAME"
else
aptly -config="$APTLY_CONFIG" publish repo --skip-signing -origin="$APTLY_ORIGIN" -label="$APTLY_LABEL" "$APTLY_REPO_NAME"
fi

rsync -av "$APTLY_ROOTDIR"/public/* "$REPO_DIR"
# Remove unnecessary files
rm -rf "$REPO_DIR/conf/" "$REPO_DIR/db/" "$APTLY_ROOTDIR" "$APTLY_CONFIG"
else
aptly -config="$APTLY_CONFIG" publish repo --skip-signing -origin="$APTLY_ORIGIN" -label="$APTLY_LABEL" "$APTLY_REPO_NAME"
echo "WARNING: no files to add in $DEB_REPO for $CODENAME"
fi

rsync -av "$APTLY_ROOTDIR"/public/* "$REPO_DIR"
# Remove unnecessary files
rm -rf "$REPO_DIR/conf/" "$REPO_DIR/db/" "$APTLY_ROOTDIR" "$APTLY_CONFIG"

0 comments on commit f5d9a66

Please sign in to comment.