-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2284 from harvesthq/bower-release-from-travis
Let Travis publish bower-chosen
- Loading branch information
Showing
4 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ node_modules | |
.project | ||
public/*.js | ||
public/*.css | ||
public/bower.json | ||
chosen.zip | ||
.sass-cache | ||
.ruby-version | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` | ||
|
||
if [ $CURRENT_BRANCH != 'master' ] ; then | ||
echo "Build not on master. Skipped bower-chosen release" | ||
exit 0 | ||
fi | ||
|
||
git clone https://pfiller:${GH_TOKEN}@github.com/harvesthq/bower-chosen.git | ||
rm -rf bower-chosen/* | ||
cp public/bower.json public/*.png public/chosen.jquery.min.js public/chosen.min.css bower-chosen/ | ||
cd bower-chosen | ||
|
||
|
||
LATEST_VERSION=$(git diff bower.json | grep version | cut -d':' -f2 | cut -d'"' -f2 | tail -1) | ||
|
||
if [ -z $LATEST_VERSION ] ; then | ||
echo "No Chosen version change. Skipped tagging" | ||
else | ||
echo "Chosen version changed. Tagging version ${LATEST_VERSION}\n" | ||
git tag -a "v${LATEST_VERSION}" -m "Version ${LATEST_VERSION}" | ||
fi | ||
|
||
git remote set-url origin https://pfiller:${GH_TOKEN}@github.com/harvesthq/bower-chosen.git | ||
git add -A | ||
git commit -m "Chosen build to bower-chosen" | ||
git push origin master | ||
git push origin --tags | ||
|
||
echo "Chosen published to harvesthq/bower-chosen" |