Skip to content

Commit

Permalink
Implement new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Jul 7, 2016
1 parent bf49823 commit b5ed6ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ the [repository settings in Travis](http://docs.travis-ci.com/user/environment-v
so that it can the release to Clojars. It also needs the `GITHUB_TOKEN`
in order to push the added tag and commit back to Github.

So Travis will:
Travis will:

1. Build docs + push those to `gh-pages` branch after every master branch build
2. Run `lein release` as well on those builds. This will:
1. Build docs + push those to `gh-pages` branch after every master branch build with the keyword `lein release $LEVEL`
For example, you could have a commit message like `add some stuff lein release :patch` which would cause it to do a patch release.
The available levels are listed in [the lein docs](https://github.com/technomancy/leiningen/blob/stable/doc/DEPLOY.md#releasing-simplified)
2. Run `lein release $LEVEL` as well on those builds. This will:
1. create new git commit and tag for new commit w/ out `-SNAPSHOT` in it
2. Create jar and push that to clojars
3. bump release number to next minor version
Expand Down
6 changes: 5 additions & 1 deletion scripts/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ set -o pipefail

AUTOMATED_AUTHOR_EMAIL=_@_._
AUTOMATED_AUTHOR_NAME=_
LEIN_RELEASE_COMMAND=$(git log --format=%B --no-merges -n 1 | grep -o 'lein release :[a-z]*')

# exit if no lein release
[ -n "$LEIN_RELEASE_COMMAND" ]

git remote set-url origin https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
git branch --set-upstream-to origin/master master
Expand All @@ -22,4 +26,4 @@ git pull origin gh-pages
./scripts/deploy-docs.sh --verbose
git checkout master
git pull origin master
lein release
eval $LEIN_RELEASE_COMMAND

0 comments on commit b5ed6ab

Please sign in to comment.