Skip to content

Commit

Permalink
Added a nightly clean up to the publish script (disable).
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Feb 20, 2024
1 parent afc9294 commit f53af09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions releng/scripts/publish-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ QUALIFIER=$(echo ${UPDATE_ZIP} | sed 's/.*org.eclipse.acceleo-\(.*\).zip$/\1/')

P2_TIMESTAMP=$(date +"%s000")

# parameter for nightly clean up, keeps NIGHTLY_COUNT for the current version.
NIGHTLY_COUNT=10
VERSION=$(echo ${QUALIFIER} | cut -d"." -f1-3)

# Transfer the zipped update site
ssh "${SSH_ACCOUNT}" mkdir -p ${NIGHTLIES_FOLDER}/${QUALIFIER}
scp -rp ${UPDATE_ZIP} "${SSH_ACCOUNT}:${NIGHTLIES_FOLDER}/${QUALIFIER}"
Expand All @@ -51,4 +55,9 @@ ssh "${SSH_ACCOUNT}" -T <<EOF
rm -r *
cp -r ../${QUALIFIER}/* .
popd
# remove older nightly
pushd ${NIGHTLIES_FOLDER}
ls -tr | grep -F ${VERSION} | head -n $(expr $(ls -tr | grep -F ${VERSION} | wc -l) - ${NIGHTLY_COUNT}) | xargs echo rm -rf
popd
EOF

0 comments on commit f53af09

Please sign in to comment.