Created
October 16, 2012 18:01
-
-
Save jwalsh/3900922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Make a static clone the working copy of a Jenkins build | |
# to a public directory for browser testing. | |
# Usage: | |
# From within the Jenkins working copy directory. | |
# | |
# version 3 (2012-06-07) | |
if [ -n "$TESTSWARM_DEST" ] | |
then | |
dest=$TESTSWARM_DEST | |
else | |
[email protected]:s.wal.sh/co | |
fi | |
project=$(grep '"name":' package.json | head -n 1 | cut -d : -f 2 | cut -d '"' -f 2) | |
rev=$(git rev-parse HEAD) | |
# npm install | |
# grunt | |
HOST=$(echo $dest | cut -d ":" -f 1) | |
PATH=$(echo $dest | cut -d ":" -f 2) | |
echo ssh $HOST \"mkdir -p $PATH/$project/$rev\" '&&' rsync -vax --exclude='".git"' . $dest/$project/$rev '&&' grunt testswarm:${rev}:${HOME}/.testswarm-config.json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment