Files
dokku/tests/test_deploy

15 lines
392 B
Bash
Executable File

#!/bin/bash
set -e
SELF=`which $0`; APP="$1"; TARGET="$2"
TMP=$(mktemp -d -t $TARGET)
trap "rm -rf $TMP" EXIT
cp -r $(dirname $SELF)/$APP/* $TMP
cd $TMP
git init
git add .
git commit -m 'initial commit'
REPO="test-$RANDOM"
git remote add target git@$TARGET:$REPO
URL_FILE=$(mktemp -t url)
git push target master
./check_deploy "$(ssh dokku@$TARGET url $REPO)" && echo "-----> Deploy success!"