Skip to content

Instantly share code, notes, and snippets.

@jwalsh
Forked from bmcmurray/gist:3895214
Created October 15, 2012 20:35
Show Gist options
  • Save jwalsh/3895256 to your computer and use it in GitHub Desktop.
Save jwalsh/3895256 to your computer and use it in GitHub Desktop.
#!/bin/bash
# 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)
dest=/var/www/html/
project=$(basename `pwd`)
rev=$(git rev-parse HEAD)
echo "Group: $project"
echo "Copy ID: $rev"
mkdir -p $dest/$project/$rev
echo "Copying... to " $dest/$project/$rev
rsync -a --exclude=".git*" . $dest/$project/$rev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment