shipit 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +57 -134
- data/README +3 -1
- data/Rakefile +5 -5
- data/lib/shipit.rb +25 -11
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,140 +1,63 @@
|
|
1
|
-
|
1
|
+
ChangeLog of http://svn.coderepos.org/share/lang/ruby/shipit/trunk
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Ask after show all steps.
|
3
|
+
2008-01-19 cho45
|
6
4
|
|
7
|
-
* [
|
8
|
-
|
9
|
-
|
5
|
+
* [bug][interface] @4959:
|
6
|
+
Remove 3rd argument of Step::ChangeVersion because it is meaningless.
|
7
|
+
Fix bug around checking vers on Step::ChangeVersion.
|
8
|
+
|
9
|
+
|
10
10
|
|
11
|
-
* [
|
12
|
-
|
13
|
-
follow removing Step::Ask
|
11
|
+
* [new] @4958:
|
12
|
+
Implement checking VERS constant to avoid trap.
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
Remove Step::Ask (is now default)
|
18
|
-
Add Step::Skip (is skip preceding steps)
|
14
|
+
2008-01-07 cho45
|
19
15
|
|
20
|
-
* [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
* [
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
* [
|
66
|
-
|
67
|
-
Release 0.0.3
|
68
|
-
|
69
|
-
* [r4075] lib/shipit.rb:
|
70
|
-
|
71
|
-
タスクの実行を内部でやらないように (version をよみなおすため)
|
72
|
-
いろいろやってみたけどこれがいちばん簡単なようだ……
|
73
|
-
|
74
|
-
* [r4073] lib/shipit.rb:
|
75
|
-
|
76
|
-
version のかきかえがうまくいかず、重複してリリースできない問題を修正
|
77
|
-
|
78
|
-
* [r4071] lib/shipit.rb:
|
79
|
-
|
80
|
-
変更が残っている場合にはリリースコミットをできないように
|
81
|
-
|
82
|
-
* [r4070] lib/shipit.rb:
|
83
|
-
|
84
|
-
定数参照の修正漏れ
|
85
|
-
|
86
|
-
* [r4069] lib/shipit.rb:
|
87
|
-
|
88
|
-
run phase 時にエラーがでないように定数参照は prepare 時にするように
|
89
|
-
|
90
|
-
* [r4068] Rakefile, lib/shipit.rb:
|
91
|
-
|
92
|
-
ChangeVersion の仕様をよくあるほうに変更
|
93
|
-
s.ChangeVersion filename, "VERSION"
|
94
|
-
|
95
|
-
* [r4054] lib/shipit.rb:
|
96
|
-
|
97
|
-
tag のとき -m 追加 (エディタがひらいてしまっていた)
|
98
|
-
|
99
|
-
* [r4052] ChangeLog, Rakefile:
|
100
|
-
|
101
|
-
Release 0.0.2
|
102
|
-
|
103
|
-
* [r4051] ., README:
|
104
|
-
|
105
|
-
svn:ignore の設定と README のサンプルを Rakefile に追従
|
106
|
-
|
107
|
-
* [r4050] README, Rakefile, lib/shipit.rb:
|
108
|
-
|
109
|
-
Step::Tag を追加
|
110
|
-
|
111
|
-
* [r4048] README:
|
112
|
-
|
113
|
-
README を更新
|
114
|
-
|
115
|
-
* [r4047] lib/shipit.rb:
|
116
|
-
|
117
|
-
前回のコミットと同じ問題
|
118
|
-
|
119
|
-
* [r4046] lib/shipit.rb:
|
120
|
-
|
121
|
-
initialize が走るときにはまだVERSは変更されていないので
|
122
|
-
コミットメッセージが矛盾してしまう
|
123
|
-
|
124
|
-
* [r4045] ChangeLog, Rakefile:
|
125
|
-
|
126
|
-
Release 0.0.0
|
127
|
-
|
128
|
-
* [r4044] Rakefile:
|
129
|
-
|
130
|
-
引数間違い
|
131
|
-
|
132
|
-
* [r4043] README, Rakefile, lib/shipit.rb:
|
133
|
-
|
134
|
-
description とか
|
135
|
-
|
136
|
-
* [r4042] ., ChangeLog, README, Rakefile, lib, lib/shipit.rb, test,
|
137
|
-
test/shipit_test.rb, test/test_helper.rb:
|
138
|
-
|
139
|
-
import
|
16
|
+
* [interface] @4185:
|
17
|
+
remove dryrun implemented by $SAFE because it is not useful.
|
18
|
+
|
19
|
+
* [interface] @4183:
|
20
|
+
use namespace
|
21
|
+
try to implement dryrun (this is just run on high $SAFE environment)
|
22
|
+
|
23
|
+
2008-01-06 cho45
|
24
|
+
|
25
|
+
* [release] @4149:
|
26
|
+
Release 0.0.4
|
27
|
+
|
28
|
+
* [interface] @4140:
|
29
|
+
Remove Step::Ask (is now default)
|
30
|
+
Add Step::Skip (is skip preceding steps)
|
31
|
+
|
32
|
+
* [new] @4139:
|
33
|
+
implement state shared with steps.
|
34
|
+
change spec of arguments of initialize
|
35
|
+
|
36
|
+
2008-01-05 cho45
|
37
|
+
|
38
|
+
* [release] @4077:
|
39
|
+
Release 0.0.3
|
40
|
+
|
41
|
+
* [bug] @4075:
|
42
|
+
タスクの実行を内部でやらないように (version をよみなおすため)
|
43
|
+
いろいろやってみたけどこれがいちばん簡単なようだ……
|
44
|
+
([important] Fix bugs around treating VERS.)
|
45
|
+
|
46
|
+
* [bug] @4069:
|
47
|
+
run phase 時にエラーがでないように定数参照は prepare 時にするように
|
48
|
+
|
49
|
+
* [interface] @4068:
|
50
|
+
ChangeVersion の仕様をよくあるほうに変更
|
51
|
+
s.ChangeVersion filename, "VERSION"
|
52
|
+
|
53
|
+
* [release] @4052:
|
54
|
+
Release 0.0.2
|
55
|
+
|
56
|
+
* [bug] @4046:
|
57
|
+
initialize が走るときにはまだVERSは変更されていないので
|
58
|
+
コミットメッセージが矛盾してしまう
|
59
|
+
(Fix discrepancy of commit message in shipit step.)
|
60
|
+
|
61
|
+
* [release] @4045:
|
62
|
+
Release 0.0.0
|
140
63
|
|
data/README
CHANGED
@@ -53,9 +53,11 @@ See more example at Rakefile[http://svn.coderepos.org/share/lang/ruby/shipit/tru
|
|
53
53
|
|
54
54
|
Some constants are currently hard-coded.
|
55
55
|
|
56
|
-
* NAME -> name of the library
|
56
|
+
* NAME -> name of the library.
|
57
57
|
* DESCRIPTION -> description of the library
|
58
58
|
* VERS -> version of the library
|
59
|
+
This is MUST reference to version string of ChangeVersion step, or
|
60
|
+
the package task will fail and RubyForge step release wrong version.
|
59
61
|
|
60
62
|
If you use different constants, please assign the value to above constants.
|
61
63
|
|
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ DESCRIPTION = "Automated release tasks."
|
|
19
19
|
RUBYFORGE_PROJECT = "lowreal"
|
20
20
|
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
21
21
|
BIN_FILES = %w( )
|
22
|
-
VERS = "0.0.
|
22
|
+
VERS = "0.0.5"
|
23
23
|
|
24
24
|
REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
|
25
25
|
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
|
@@ -116,13 +116,13 @@ Rake::ShipitTask.new do |s|
|
|
116
116
|
s.Step.new {
|
117
117
|
system("svn", "up")
|
118
118
|
}.and {}
|
119
|
-
s.Task :rubyforge
|
120
119
|
s.Step.new {
|
121
|
-
raise "
|
120
|
+
raise "changelog-with-hatenastar.rb is not found" unless system("which", "changelog-with-hatenastar.rb")
|
122
121
|
}.and {
|
123
|
-
system("
|
122
|
+
system("changelog-with-hatenastar.rb > ChangeLog")
|
124
123
|
}
|
125
|
-
s.
|
124
|
+
s.Task :rubyforge
|
125
|
+
s.ChangeVersion "Rakefile", "VERS"
|
126
126
|
s.Commit
|
127
127
|
s.Task :clean, :package
|
128
128
|
s.RubyForge
|
data/lib/shipit.rb
CHANGED
@@ -2,6 +2,7 @@ require "rubygems"
|
|
2
2
|
require "rake"
|
3
3
|
require "rake/tasklib"
|
4
4
|
require "term/ansicolor"
|
5
|
+
require "fileutils"
|
5
6
|
|
6
7
|
class Rake::ShipitTask < Rake::TaskLib
|
7
8
|
attr_reader :name
|
@@ -40,7 +41,7 @@ class Rake::ShipitTask < Rake::TaskLib
|
|
40
41
|
s.prepare if s.respond_to? :prepare
|
41
42
|
end
|
42
43
|
puts green { "done." }
|
43
|
-
unless t.name =~
|
44
|
+
unless t.name =~ /:prepare$/
|
44
45
|
puts
|
45
46
|
puts green { "Steps: #{steps.map{|i| i.class.name.sub(/.+::/, "")}.join(", ")}" }
|
46
47
|
puts "Really run? Cancel to press Ctrl+C."
|
@@ -54,10 +55,12 @@ class Rake::ShipitTask < Rake::TaskLib
|
|
54
55
|
end
|
55
56
|
desc "Shipit: Automated Release"
|
56
57
|
task @name, &t
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
namespace @name do
|
59
|
+
desc "Shipit: Automated Release (Only run prepare phase)"
|
60
|
+
task :prepare, &t
|
61
|
+
# desc "Shipit: Automated Release (Dry run)"
|
62
|
+
# task :dryrun, &t
|
63
|
+
end
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
@@ -115,10 +118,9 @@ class Rake::ShipitTask::Step::Twitter
|
|
115
118
|
end
|
116
119
|
|
117
120
|
class Rake::ShipitTask::Step::ChangeVersion
|
118
|
-
def initialize(step, file, name="VERSION"
|
121
|
+
def initialize(step, file, name="VERSION")
|
119
122
|
@file = file
|
120
123
|
@name = name
|
121
|
-
@vers = vers
|
122
124
|
end
|
123
125
|
|
124
126
|
def prepare
|
@@ -127,17 +129,29 @@ class Rake::ShipitTask::Step::ChangeVersion
|
|
127
129
|
@content = @file.read
|
128
130
|
@match = @content.match(/#{@name}\s*=\s*['"](\d+\.\d+\.\d+)['"]/)
|
129
131
|
@new_version = @match[1].succ
|
132
|
+
@newcont = @content[0..@match.begin(1)-1] + @new_version + @content[@match.end(1)..-1]
|
130
133
|
raise "Can't find version string in #{@file}." if @match.nil?
|
131
134
|
puts "Find version string #{@match[1]} and will change to #{@new_version}"
|
132
|
-
|
135
|
+
|
136
|
+
# check content of Rakefile
|
137
|
+
@org = @file.parent + "#{@file.basename}.org"
|
138
|
+
FileUtils.cp @file, @org
|
139
|
+
@file.open("w") do |f|
|
140
|
+
f.print @newcont
|
141
|
+
end
|
142
|
+
m = Module.new
|
143
|
+
m.module_eval(File.read("Rakefile"))
|
144
|
+
|
145
|
+
FileUtils.mv @org, @file
|
146
|
+
raise "Constant VERS in Rakefile must be same as 3rd argument of ChangeVersion step." unless @new_version == m.const_get(:VERS)
|
147
|
+
|
148
|
+
VERS.replace @new_version
|
133
149
|
end
|
134
150
|
|
135
151
|
def run
|
136
152
|
puts "Changing version to #{@new_version}"
|
137
153
|
@file.open("w") do |f|
|
138
|
-
f.print @
|
139
|
-
f.print @new_version
|
140
|
-
f.print @content[@match.end(1)..-1]
|
154
|
+
f.print @newcont
|
141
155
|
end
|
142
156
|
end
|
143
157
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cho45
|
@@ -9,7 +9,7 @@ autorequire: shipit
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-01-
|
12
|
+
date: 2008-01-19 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|