Navigation Menu

Skip to content

Commit

Permalink
Nightly: delete old builds not in branches list
Browse files Browse the repository at this point in the history
Before starting the build process itself, the script will look in the
target directory for any old builds for branches that are not part of
the specified branches list, and delete them.

This ensures we only keep nightly builds for branches under active
development

Fixes #22642
  • Loading branch information
dregad committed Apr 2, 2017
1 parent cfe30a2 commit bb82d8e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nightly-builds.sh
Expand Up @@ -52,6 +52,12 @@ cat <<-EOF >>$logfile
EOF

# Remove any builds not part of the branches list
echo "$(date +'%F %T') Deleting old builds not part of branches list" |tee -a $logfile
find $pathBuilds -maxdepth 1 -name 'mantisbt*' |
grep -vE -- "-(${branches//,/|})-[0-9a-f]{7}" |
xargs --no-run-if-empty rm -r 2>&1 |tee -a $logfile

# Build the tarballs
echo "$(date +'%F %T') Generating nightly builds for branches:"
refList=$(eval echo origin/{$branches})
Expand Down

0 comments on commit bb82d8e

Please sign in to comment.