anchorman 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/anchorman.rb +1 -0
- data/lib/anchorman/cli.rb +32 -3
- data/lib/anchorman/version.rb +1 -1
- data/release_notes/release_notes.md +9 -4
- metadata +20 -4
data/README.md
CHANGED
@@ -43,15 +43,15 @@ Builds notes only for commits between two git refs. If not supplied, `to` defaul
|
|
43
43
|
|
44
44
|
Writes out notes to `release_notes/<filename>.md`.Can be combined with other options.
|
45
45
|
|
46
|
-
### coming soon
|
47
|
-
|
48
46
|
$ anchorman html
|
49
47
|
|
50
48
|
Builds `release_notes/html` with html versions of all Markdown files in `release_notes`
|
51
49
|
|
52
50
|
Samples can be found in this repository.
|
53
51
|
|
52
|
+
## Release Notes
|
54
53
|
|
54
|
+
[Notes live in the repo](https://github.com/infews/anchorman/blob/master/release_notes/release_notes.md). Generated with Anchorman and then made readable and useful to humans.
|
55
55
|
|
56
56
|
|
57
57
|
## Contributing
|
@@ -67,4 +67,4 @@ Samples can be found in this repository.
|
|
67
67
|
[pt]: http://www.pivotaltracker.com
|
68
68
|
[md]: http://daringfireball.net/projects/markdown/
|
69
69
|
[gfm]: https://help.github.com/articles/github-flavored-markdown
|
70
|
-
[backlog]: https://www.pivotaltracker.com/projects/776269
|
70
|
+
[backlog]: https://www.pivotaltracker.com/projects/776269
|
data/lib/anchorman.rb
CHANGED
data/lib/anchorman/cli.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
module Anchorman
|
2
|
+
NOTES_HEADER = "# Release Notes\n\n## Summary\n\n## Changes\n\n"
|
3
|
+
NOTES_FOOTER = "\n\n\------\n\n_Release Notes generated with [Anchorman](http://github.com/infews/anchorman)_"
|
4
|
+
|
2
5
|
class CLI < Thor
|
3
6
|
|
4
7
|
include Thor::Actions
|
5
8
|
|
6
9
|
desc "notes", "Generates a draft release notes document"
|
7
10
|
method_options from: :string, to: :string, name: "release_notes"
|
11
|
+
|
8
12
|
def notes
|
9
13
|
git = open_repo
|
10
14
|
|
@@ -20,14 +24,30 @@ module Anchorman
|
|
20
24
|
|
21
25
|
empty_directory 'release_notes'
|
22
26
|
|
23
|
-
header = "# Release Notes\n\n## Summary\n\n## Changes\n\n"
|
24
27
|
formatter = CommitFormatter.new(Repo.new(git))
|
25
|
-
notes =
|
28
|
+
notes = commits.collect { |c| formatter.format(c) }.join("\n\n")
|
26
29
|
|
27
30
|
create_file "release_notes/#{options[:name]}.md" do
|
28
|
-
|
31
|
+
NOTES_HEADER + notes + NOTES_FOOTER
|
29
32
|
end
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "html", "Converts release notes to HTML using Github-Flavored Markdown"
|
36
|
+
def html
|
37
|
+
notes = get_notes
|
38
|
+
|
39
|
+
return unless notes.length
|
30
40
|
|
41
|
+
say "#{notes.length} note(s) found, generating HTML..."
|
42
|
+
|
43
|
+
empty_directory File.join('release_notes', 'html')
|
44
|
+
|
45
|
+
notes.each do |n|
|
46
|
+
html_file_name = "#{File.basename(n)[0..-4]}.html"
|
47
|
+
create_file(File.join 'release_notes', 'html', html_file_name) do
|
48
|
+
GitHub::Markdown.render_gfm(File.read(n))
|
49
|
+
end
|
50
|
+
end
|
31
51
|
end
|
32
52
|
|
33
53
|
no_tasks do
|
@@ -42,6 +62,15 @@ module Anchorman
|
|
42
62
|
say 'No git log found', :red
|
43
63
|
end
|
44
64
|
|
65
|
+
def get_notes
|
66
|
+
notes = Dir.glob File.join('release_notes', '*.md')
|
67
|
+
if notes.length == 0
|
68
|
+
say "No release_notes directory found", :red
|
69
|
+
say "Run 'anchorman notes' to generate release notes", :yellow
|
70
|
+
end
|
71
|
+
notes
|
72
|
+
end
|
73
|
+
|
45
74
|
end
|
46
75
|
end
|
47
76
|
end
|
data/lib/anchorman/version.rb
CHANGED
@@ -1,17 +1,22 @@
|
|
1
1
|
# Anchorman Release Notes
|
2
2
|
|
3
|
-
##
|
3
|
+
## v 0.6.0
|
4
4
|
|
5
|
-
|
5
|
+
* `anchorman html` functionality added to take markdown files and make HTML using the github-markdown gem
|
6
|
+
* Output now has a footer that shamelessly plugs Anchorman
|
6
7
|
|
7
8
|
## v 0.5.0
|
8
9
|
|
10
|
+
First Release. A real MVP.
|
11
|
+
|
9
12
|
* First Release
|
10
13
|
* Support for `anchorman notes --from=<ref> --to=<ref> --name=<output file>`
|
11
14
|
* The commit history is a mess due to misuse of `git config` for the git repos under test
|
12
15
|
* Adding [Travis](http://travis-ci.org) builds.
|
13
16
|
* SHA: [ca66e8240b7cf1a86412e3463bc54c6d96fb7a34](https://github.com/infews/anchorman/commit/ca66e8240b7cf1a86412e3463bc54c6d96fb7a34)
|
14
|
-
* Davis W. Frank, dwfrank+github@infe.ws
|
15
17
|
* Building wrong Github URL to the commit [Fixes #45905835](http://www.pivotaltracker.com/story/45905835)
|
16
18
|
* SHA: [01946ca9bf3d0752ee48a0f3247d0f120bee6214](https://github.com/infews/anchorman/commit/01946ca9bf3d0752ee48a0f3247d0f120bee6214)
|
17
|
-
|
19
|
+
|
20
|
+
------
|
21
|
+
|
22
|
+
Release Notes generated with [Anchorman](http://github.com/infews/anchorman)_
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anchorman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: git
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: github-markdown
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: thor
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
155
|
version: '0'
|
140
156
|
segments:
|
141
157
|
- 0
|
142
|
-
hash: -
|
158
|
+
hash: -802147756992914157
|
143
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
160
|
none: false
|
145
161
|
requirements:
|
@@ -148,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
164
|
version: '0'
|
149
165
|
segments:
|
150
166
|
- 0
|
151
|
-
hash: -
|
167
|
+
hash: -802147756992914157
|
152
168
|
requirements: []
|
153
169
|
rubyforge_project:
|
154
170
|
rubygems_version: 1.8.25
|