Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Commit

Permalink
testing fixed script
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Mar 24, 2017
1 parent 1f8d173 commit 6194b2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ cache: yarn
before_script: "node guard.js"
script: "yarn test -- --coverage && yarn lint"
after_script: "yarn coveralls"
after_success: "bash yarn.sh"
before_install: "bash yarn.sh"
notifications:
email: false
14 changes: 11 additions & 3 deletions yarn.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/bin/bash

# Installation instructions for Travis CI, example repo using it in production: https://github.com/stipsan/uikit-react

# .travis.yml
#

echo "Should yarn.lock be regenerated?"
if [[ $TRAVIS_PULL_REQUEST_BRANCH != *"greenkeeper"* ]]; then
# Not a GreenKeeper Pull Request, aborting
echo "Not a GreenKeeper Pull Request, aborting"
exit 0
fi

echo "Cloning repo"
echo "Yes, cloning repo"
git clone "https://"$PUSH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG".git" repo
cd repo

Expand All @@ -16,7 +21,7 @@ git checkout $TRAVIS_PULL_REQUEST_BRANCH
# See if commit message includes "update"
git log --name-status HEAD^..HEAD | grep "update" || exit 0

echo "(Creat/updat)ing lockfile"
echo "updatinging lockfile"
yarn

echo "Commit and push yarn.lock"
Expand All @@ -27,3 +32,6 @@ git config --global push.default simple
git add yarn.lock
git commit -m "chore: update yarn.lock"
git push

echo "Pushed commit to trigger rebuild, this build will cancel"
exit 1

0 comments on commit 6194b2d

Please sign in to comment.