deploy script standalone

This commit is contained in:
Nabeel Shahzad 2017-12-13 17:03:59 -06:00
parent cad71fb5a2
commit 50cece80b0
2 changed files with 15 additions and 10 deletions

View File

@ -2,7 +2,9 @@
#
# Create the phpvms database if needed:
# docker exec phpvms /usr/bin/mysql -uroot -e 'CREATE DATABASE phpvms'
SHELL := /bin/bash
PKG_NAME := "/tmp"
CURR_PATH=$(shell pwd)
.PHONY: all
@ -32,7 +34,6 @@ build:
install: build
@php artisan database:create
@php artisan migrate --seed
@make import-airports
@echo "Done!"
.PHONY: update
@ -65,15 +66,7 @@ schema:
.PHONY: deploy-package
deploy-package:
ifeq ($$TRAVIS_TAG,)
PKG_NAME=$$TRAVIS_TAG
else
PKG_NAME=nightly
fi
rm -rf .git deploy_rsa.enc .idea phpvms.iml
tar -czvf $PKG_NAME.tar.gz -C $TRAVIS_BUILD_DIR .
rsync -r --delete-after --quiet $PKG_NAME.tar.gz downloads@phpvms.net:/var/www/downloads/
./deploy_script.sh
.PHONY: docker
docker:

12
deploy_script.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
if test "$TRAVIS_TAG"; then
PKG_NAME=$TRAVIS_TAG
else
PKG_NAME=nightly
fi
echo $PKG_NAME
#rm -rf .git deploy_rsa.enc .idea phpvms.iml
tar -czvf $PKG_NAME.tar.gz -C $$TRAVIS_BUILD_DIR .
rsync -r --delete-after --quiet $PKG_NAME.tar.gz downloads@phpvms.net:/var/www/downloads/