diff options
author | Harald Musum <musum@yahooinc.com> | 2023-11-08 12:52:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 12:52:28 +0100 |
commit | 9f41363b07c2cee35e3ca0442217f40d38cb81b8 (patch) | |
tree | 941a6078df790a234453311f2e8c6c9d96265358 /screwdriver/delete-old-cloudsmith-artifacts.sh | |
parent | 59ecf3b33f29ab82a61bd888b1a4f1dc60d60027 (diff) | |
parent | 3f071ed74c83634c498a3a85ed12d225c34e24e5 (diff) |
Merge pull request #29278 from vespa-engine/aressem/fix-delete
Early exit with message if there are no old rpms to delete.
Diffstat (limited to 'screwdriver/delete-old-cloudsmith-artifacts.sh')
-rwxr-xr-x | screwdriver/delete-old-cloudsmith-artifacts.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/screwdriver/delete-old-cloudsmith-artifacts.sh b/screwdriver/delete-old-cloudsmith-artifacts.sh index d0fea25bc78..1333aa6cec1 100755 --- a/screwdriver/delete-old-cloudsmith-artifacts.sh +++ b/screwdriver/delete-old-cloudsmith-artifacts.sh @@ -12,6 +12,11 @@ rm -f /tmp/vespa-open-source-rpms.repo VERSIONS_TO_DELETE=$(dnf list -y --quiet --showduplicates --disablerepo='*' --enablerepo=vespa-open-source-rpms vespa | awk '/[0-9].*\.[0-9].*\.[0-9].*/{print $2}' | sort -V | head -n -$MAX_NUMBER_OF_RELEASES | grep -v "7.594.36") +if [[ -z "$VERSIONS_TO_DELETE" ]]; then + echo "No old RPM versions to delete found. Exiting." + exit 0 +fi + RPMS_TO_DELETE=$(mktemp) trap "rm -f $RPMS_TO_DELETE" EXIT |