Skip to content

Commit

Permalink
#308 adjust cleanup scripts for new name logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Schneck committed Mar 8, 2018
1 parent f5db12f commit cbe0a5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
9 changes: 0 additions & 9 deletions .build/is-feature-branch-version.sh

This file was deleted.

15 changes: 8 additions & 7 deletions .build/remove-snapshot-artifacts.sh
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
echo "--------------------------------------------------------------------------------"
echo ".... remove git tags"
export PATTERN="SNAPSHOT"
echo ".... remove git tags for pattern:$PATTERN"
git fetch --tags
tags=$(git tag | grep SNAPSHOT)
tags=$(git tag | grep $PATTERN)
echo $tags | xargs -n1 echo

if [[ "$1" == "-y" ]]; then
Expand All @@ -19,10 +20,10 @@ else
exit 0
fi
echo "--------------------------------------------------------------------------------"
echo "... remove old SNAPSHOT zip and installer files?"
echo "... remove old $PATTERN zip and installer files?"

ssh sakuli@labs.consol.de -4 'ls /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.zip'
ssh sakuli@labs.consol.de -4 'ls /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.jar'
ssh sakuli@labs.consol.de -4 'ls /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.zip'
ssh sakuli@labs.consol.de -4 'ls /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.jar'

if [[ "$1" == "-y" ]]; then
CONT="y"
Expand All @@ -32,7 +33,7 @@ else
fi

if [ "$CONT" = "y" ]; then
ssh sakuli@labs.consol.de -4 'rm /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.zip' || echo "do not fail if nothing have changed"
ssh sakuli@labs.consol.de -4 'rm /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.jar' || echo "do not fail if nothing have changed"
ssh sakuli@labs.consol.de -4 'rm /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.zip' || echo "do not fail if nothing have changed"
ssh sakuli@labs.consol.de -4 'rm /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.jar' || echo "do not fail if nothing have changed"
fi

2 changes: 1 addition & 1 deletion docker/.build/delete_dockerhub_tags.sh
Expand Up @@ -15,7 +15,7 @@ IMAGES=(
"consol/omd-labs-centos-sakuli"
"consol/omd-labs-debian-sakuli"
)
PATTERN="-SNAPSHOT"
PATTERN="SNAPSHOT"
#PATTERN="v1.1.0-SNAPSHOT"

logfile="docker.delete.images.log"
Expand Down

0 comments on commit cbe0a5e

Please sign in to comment.