Add deploy script

This commit is contained in:
Nicholas Kariniemi 2014-12-07 10:36:47 +02:00
parent c1b6cc7a08
commit e8242d730f
2 changed files with 8 additions and 3 deletions

View file

@ -18,6 +18,6 @@ echo "" &&
echo "$ lein uberjar" &&
lein uberjar &&
mkdir target/builds
RELEASE_NAME=grub-`date "+%F-%H%M"`-`git rev-parse HEAD | cut -c -10`.jar &&
mv target/grub-standalone.jar target/builds/$RELEASE_NAME &&
echo "Built package target/builds/$RELEASE_NAME"
BUILD_NAME=grub-`date "+%F-%H%M"`-`git rev-parse HEAD | cut -c -10`.jar &&
mv target/grub-standalone.jar target/builds/$BUILD_NAME &&
echo "Built package target/builds/$BUILD_NAME"

5
scripts/deploy.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
BUILD_NAME=`ls -t target/builds | head -1`
#scp target/builds/$BUILD_NAME $GRUB_USER@$GRUB_SERVER:$GRUB_STAGING_DIR/$BUILD_NAME
ssh $GRUB_USER@$GRUB_SERVER "cp $GRUB_STAGING_DIR/$BUILD_NAME $GRUB_RELEASE_DIR/$BUILD_NAME && killall java && run_server.sh"