hoe-git 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGELOG.rdoc +7 -0
  2. data/README.rdoc +16 -0
  3. data/Rakefile +1 -1
  4. data/lib/hoe/git.rb +28 -9
  5. metadata +4 -4
@@ -1,3 +1,10 @@
1
+ === 1.3.0 / 2009-07-27
2
+
3
+ * Add a git:manifest task. [Phil Hagelb0rg]
4
+ * Clean up git:changelog a bit.
5
+ * Add the doofus Hoe plugin.
6
+ * Update README w/better docs.
7
+
1
8
  === 1.2.0 / 2009-07-01
2
9
 
3
10
  * Add git-svn support for git:tag and git:changelog.
@@ -13,6 +13,9 @@ expect it'll learn a few more tricks in the future.
13
13
  # in your Rakefile
14
14
  Hoe.plugin :git
15
15
 
16
+ If this plugin doesn't see a .git directory at the root of your
17
+ project, it'll silently deactivate itself.
18
+
16
19
  === Autogenerating the Changelog
17
20
 
18
21
  $ rake git:changelog
@@ -28,6 +31,13 @@ like this:
28
31
 
29
32
  * Did a thing with the stuff. [I R Contributor]
30
33
 
34
+ === Generating the Manifest
35
+
36
+ $ rake git:manifest
37
+
38
+ This will regenerate <tt>Manifest.txt</tt> using <tt>git
39
+ ls-files</tt>. It respects Hoe's manifest sort order and excludes.
40
+
31
41
  === Tagging and Sanity Checking a Release
32
42
 
33
43
  $ rake release VERSION=1.0.0
@@ -36,6 +46,12 @@ In addition to the normal RubyForge release process, this will create
36
46
  and push a <tt>v1.0.0</tt> tag. It'll also abort the release if your
37
47
  index is dirty, or if there are untracked files present.
38
48
 
49
+ === git-svn
50
+
51
+ The <tt>git:changelog</tt> and <tt>git:tag</tt> tasks understand
52
+ <tt>git-svn</tt> repositories, and will adjust their behavior
53
+ accordingly.
54
+
39
55
  == Dependencies
40
56
 
41
57
  Hoe and Git, obviously. I wouldn't be surprised if things don't quite
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ $: << "lib"
3
3
  require "rubygems"
4
4
  require "hoe"
5
5
 
6
- Hoe.plugin :git
6
+ Hoe.plugin :doofus, :git
7
7
 
8
8
  Hoe.spec "hoe-git" do
9
9
  developer "John Barnette", "jbarnette@rubyforge.org"
@@ -6,14 +6,21 @@ class Hoe #:nodoc:
6
6
  # Hoe.plugin :git
7
7
  #
8
8
  # Hoe.spec "myproj" do
9
- # self.git_release_tag_prefix = "REL_"
10
- # self.git_remotes << "myremote"
9
+ # self.git_release_tag_prefix = "REL_"
10
+ # self.git_remotes << "myremote"
11
11
  # end
12
+ #
13
+ #
14
+ # === Tasks
15
+ #
16
+ # git:changelog:: Print the current changelog.
17
+ # git:manifest:: Update the manifest with Git's file list.
18
+ # git:tag:: Create and push a tag.
12
19
 
13
20
  module Git
14
21
 
15
22
  # Duh.
16
- VERSION = "1.2.0"
23
+ VERSION = "1.3.0"
17
24
 
18
25
  # What do you want at the front of your release tags?
19
26
  # [default: <tt>"v"</tt>]
@@ -39,24 +46,37 @@ class Hoe #:nodoc:
39
46
  tag = ENV["FROM"] || tags.last
40
47
  range = [tag, "HEAD"].compact.join ".."
41
48
  cmd = "git log #{range} '--format=tformat:%s|||%aN|||%aE'"
49
+ now = Time.new.strftime "%Y-%m-%d"
42
50
 
43
51
  changes = `#{cmd}`.split("\n").map do |line|
44
52
  msg, author, email = line.split("|||").map { |e| e.empty? ? nil : e }
53
+
45
54
  developer = self.author.include?(author) ||
46
55
  self.email.include?(email)
47
56
 
48
- change = [msg]
49
- change << "[#{author || email}]" unless developer
50
-
51
- change.join " "
57
+ msg << " [#{author || email}]" unless developer
58
+ msg
52
59
  end
53
60
 
54
61
  next if changes.empty?
55
62
 
56
- puts "=== #{ENV["VERSION"] || 'NEXT'} / #{Time.new.strftime '%Y-%m-%d'}"
63
+ puts "=== #{ENV['VERSION'] || 'NEXT'} / #{now}"
57
64
  puts
58
65
 
59
66
  changes.each { |change| puts "* #{change}" }
67
+ puts
68
+ end
69
+
70
+ desc "Update the manifest with Git's file list. Use Hoe's excludes."
71
+ task "git:manifest" do
72
+ with_config do |config, _|
73
+ files = `git ls-files`.split "\n"
74
+ files.reject! { |f| f =~ config["exclude"] }
75
+
76
+ File.open "Manifest.txt", "w" do |f|
77
+ f.puts files.sort.join("\n")
78
+ end
79
+ end
60
80
  end
61
81
 
62
82
  desc "Create and push a TAG " +
@@ -76,7 +96,6 @@ class Hoe #:nodoc:
76
96
  end
77
97
 
78
98
  task :release => "git:tag"
79
-
80
99
  end
81
100
 
82
101
  def git_svn?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-01 00:00:00 -07:00
12
+ date: 2009-07-27 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.3.1
33
+ version: 2.3.2
34
34
  version:
35
35
  description: |-
36
36
  A set of Hoe plugins for tighter Git integration. Provides tasks to
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements: []
79
79
 
80
80
  rubyforge_project: hoe-git
81
- rubygems_version: 1.3.4
81
+ rubygems_version: 1.3.5
82
82
  signing_key:
83
83
  specification_version: 3
84
84
  summary: A set of Hoe plugins for tighter Git integration