deploy version and list versions

This commit is contained in:
overflowerror 2018-07-10 21:40:22 +02:00
parent 35e0af7f98
commit e7ce527aba
2 changed files with 21 additions and 0 deletions

13
buildtools/deploy.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
DEPLOY_DIR=$1
VERSIONS=./versions
VERSION=$2
pushd $DEPLOY_DIR
unlink NurseBot.jar
ln -s $VERSIONS/NurseBot$VERSION.jar NurseBot.jar
popd

8
buildtools/versions.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
DEPLOY_DIR=$1
VERSIONS=./versions
ls $DEPLOY_DIR/$VERSIONS/*.jar | while read file; do
echo $file | awk -F"NurseBot" '{ print $2 }' | awk -F".jar" '{ print $1 }'
done