Skip to content

Commit 0bc166f

Browse files
committed
Merge pull request #60 from github/release-1.4.0
Release 1.4.0
2 parents 8c9d942 + cfaf1cf commit 0bc166f

File tree

6 files changed

+78
-1
lines changed

6 files changed

+78
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CHANGELOG
2+
3+
## v1.4.0
4+
5+
* Document constructor options [#57](https://github.com/github/github-ldap/pull/57)
6+
* [CI] Add Vagrant box for running tests against OpenLDAP locally [#55](https://github.com/github/github-ldap/pull/55)
7+
* Run all tests, including those in subdirectories [#54](https://github.com/github/github-ldap/pull/54)
8+
* Add ActiveDirectory membership validator [#52](https://github.com/github/github-ldap/pull/52)
9+
* Merge dev-v2 branch into master [#50](https://github.com/github/github-ldap/pull/50)
10+
* Pass through search options for GitHub::Ldap::Domain#user? [#51](https://github.com/github/github-ldap/pull/51)
11+
* Fix membership validation tests [#49](https://github.com/github/github-ldap/pull/49)
12+
* Add CI build for OpenLDAP integration [#48](https://github.com/github/github-ldap/pull/48)
13+
* Membership Validators [#45](https://github.com/github/github-ldap/pull/45)

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,15 @@ end
130130
3. Commit your changes (`git commit -am 'Add some feature'`)
131131
4. Push to the branch (`git push origin my-new-feature`)
132132
5. Create new Pull Request
133+
134+
## Releasing
135+
136+
This section is for gem maintainers to cut a new version of the gem. See
137+
[jch/release-scripts](https://github.com/jch/release-scripts) for original
138+
source of release scripts.
139+
140+
* Create a new branch from `master` named `release-x.y.z`, where `x.y.z` is the version to be released
141+
* Update `github-ldap.gemspec` to x.y.z following [semver](http://semver.org)
142+
* Run `script/changelog` and paste the draft into `CHANGELOG.md`. Edit as needed
143+
* Create pull request to solict feedback
144+
* After merging the pull request, on the master branch, run `script/release`

github-ldap.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = "github-ldap"
5-
spec.version = "1.3.6"
5+
spec.version = "1.4.0"
66
spec.authors = ["David Calavera"]
77
spec.email = ["david.calavera@gmail.com"]
88
spec.description = %q{Ldap authentication for humans}

script/changelog

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
# Usage: script/changelog [-r <repo>] [-b <base>] [-h <head>]
3+
#
4+
# repo: base string of GitHub repository url. e.g. "user_or_org/repository". Defaults to git remote url.
5+
# base: git ref to compare from. e.g. "v1.3.1". Defaults to latest git tag.
6+
# head: git ref to compare to. Defaults to "HEAD".
7+
#
8+
# Generate a changelog preview from pull requests merged between `base` and
9+
# `head`.
10+
#
11+
set -e
12+
13+
[ $# -eq 0 ] && set -- --help
14+
15+
# parse args
16+
repo=$(git remote -v | grep push | awk '{print $2}' | cut -d'/' -f4-)
17+
base=$(git tag -l | sort -n | tail -n 1)
18+
head="HEAD"
19+
api_url="https://api.github.com"
20+
21+
echo "# $base..$head"
22+
echo
23+
24+
# get merged PR's. Better way is to query the API for these, but this is easier
25+
for pr in $(git log --oneline v1.3.6..HEAD | grep "Merge pull request" | awk '{gsub("#",""); print $5}')
26+
do
27+
# frustrated with trying to pull out the right values, fell back to ruby
28+
curl -s "$api_url/repos/$repo/pulls/$pr" | ruby -rjson -e 'pr=JSON.parse(STDIN.read); puts "* #{pr[%q(title)]} [##{pr[%q(number)]}](#{pr[%q(html_url)]})"'
29+
done

script/package

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# Usage: script/package
3+
# Updates the gemspec and builds a new gem in the pkg directory.
4+
5+
mkdir -p pkg
6+
gem build *.gemspec
7+
mv *.gem pkg

script/release

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# Usage: script/release
3+
# Build the package, tag a commit, push it to origin, and then release the
4+
# package publicly.
5+
6+
set -e
7+
8+
version="$(script/package | grep Version: | awk '{print $2}')"
9+
[ -n "$version" ] || exit 1
10+
11+
echo $version
12+
git commit --allow-empty -a -m "Release $version"
13+
git tag "v$version"
14+
git push origin
15+
git push origin "v$version"
16+
gem push pkg/*-${version}.gem

0 commit comments

Comments
 (0)