Skip to content

Commit

Permalink
Merge pull request #24 from jeffposnick/master
Browse files Browse the repository at this point in the history
gp.sh: branch via command line parameter
  • Loading branch information
dfreedm committed May 28, 2014
2 parents e6928bd + 404eac6 commit 81bad5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/gp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# This script pushes a demo-friendly version of your element and its
# dependencies to gh-pages.

# usage gp Polymer core-item
# usage gp Polymer core-item [branch]
# Run in a clean directory passing in a GitHub org and repo name
org=$1
repo=$2
branch=${3:-"master"} # default to master when branch isn't specified

# make folder (same as input, no checking!)
mkdir $repo
Expand All @@ -20,8 +21,8 @@ git checkout --orphan gh-pages
git rm -rf -q .

# use bower to install runtime deployment
bower cache clean $repo # ensure we're getting the latest from master.
bower install --config.directory="components" $org/$repo#master
bower cache clean $repo # ensure we're getting the latest from the desired branch.
bower install --config.directory="components" $org/$repo#$branch

# redirect by default to the component folder
echo "<META http-equiv="refresh" content=\"0;URL=components/$repo/\">" >index.html
Expand Down

0 comments on commit 81bad5c

Please sign in to comment.