haml-edge 2.1.49 → 2.1.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/EDGE_GEM_VERSION +1 -1
  2. data/Rakefile +55 -49
  3. data/VERSION +1 -1
  4. metadata +3 -3
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.49
1
+ 2.1.50
data/Rakefile CHANGED
@@ -82,40 +82,42 @@ task :release => [:package] do
82
82
  end
83
83
 
84
84
  task :release_edge do
85
- puts "#{'=' * 50} Running rake release_edge"
85
+ ensure_git_cleanup do
86
+ puts "#{'=' * 50} Running rake release_edge"
86
87
 
87
- sh %{git checkout edge-gem}
88
- sh %{git reset --hard origin/edge-gem}
89
- sh %{git merge origin/master}
88
+ sh %{git checkout edge-gem}
89
+ sh %{git reset --hard origin/edge-gem}
90
+ sh %{git merge origin/master}
90
91
 
91
- # Get the current master branch version
92
- version = File.read('VERSION').strip.split('.').map {|n| n.to_i}
93
- unless version[1] % 2 == 1 && version[2] == 0
94
- raise "#{version.join('.')} is not a development version"
95
- end
92
+ # Get the current master branch version
93
+ version = File.read('VERSION').strip.split('.').map {|n| n.to_i}
94
+ unless version[1] % 2 == 1 && version[2] == 0
95
+ raise "#{version.join('.')} is not a development version"
96
+ end
96
97
 
97
- # Bump the edge gem version
98
- edge_version = File.read('EDGE_GEM_VERSION').strip.split('.').map {|n| n.to_i}
99
- if edge_version[0..1] != version[0..1]
100
- # A new master branch version was released, reset the edge gem version
101
- edge_version[0..1] = version[0..1]
102
- edge_version[2] = 0
103
- else
104
- # Just bump the teeny version
105
- edge_version[2] += 1
98
+ # Bump the edge gem version
99
+ edge_version = File.read('EDGE_GEM_VERSION').strip.split('.').map {|n| n.to_i}
100
+ if edge_version[0..1] != version[0..1]
101
+ # A new master branch version was released, reset the edge gem version
102
+ edge_version[0..1] = version[0..1]
103
+ edge_version[2] = 0
104
+ else
105
+ # Just bump the teeny version
106
+ edge_version[2] += 1
107
+ end
108
+ edge_version = edge_version.join('.')
109
+ File.open('EDGE_GEM_VERSION', 'w') {|f| f.puts(edge_version)}
110
+ sh %{git commit -m "Bump edge gem version to #{edge_version}." EDGE_GEM_VERSION}
111
+ sh %{git push origin edge-gem}
112
+
113
+ # Package the edge gem with the proper version
114
+ File.open('VERSION', 'w') {|f| f.puts(edge_version)}
115
+ sh %{rake package}
116
+ sh %{git checkout VERSION}
117
+
118
+ sh %{rubyforge login}
119
+ sh %{rubyforge add_release haml haml-edge "Bleeding Edge (v#{edge_version})" pkg/haml-edge-#{edge_version}.gem}
106
120
  end
107
- edge_version = edge_version.join('.')
108
- File.open('EDGE_GEM_VERSION', 'w') {|f| f.puts(edge_version)}
109
- sh %{git commit -m "Bump edge gem version to #{edge_version}." EDGE_GEM_VERSION}
110
- sh %{git push origin edge-gem}
111
-
112
- # Package the edge gem with the proper version
113
- File.open('VERSION', 'w') {|f| f.puts(edge_version)}
114
- sh %{rake package}
115
- sh %{git checkout VERSION}
116
-
117
- sh %{rubyforge login}
118
- sh %{rubyforge add_release haml haml-edge "Bleeding Edge (v#{edge_version})" pkg/haml-edge-#{edge_version}.gem}
119
121
  end
120
122
 
121
123
  task :watch_for_update do
@@ -156,13 +158,15 @@ rescue LoadError
156
158
  end
157
159
 
158
160
  task :pages do
159
- puts "#{'=' * 50} Running rake pages PROJ=#{ENV["PROJ"].inspect}"
160
- raise 'No ENV["PROJ"]!' unless proj = ENV["PROJ"]
161
- sh %{git checkout #{proj}-pages}
162
- sh %{git reset --hard origin/#{proj}-pages}
163
-
164
- sh %{rake build --trace}
165
- sh %{rsync -av --delete site/ /var/www/#{proj}-pages}
161
+ ensure_git_cleanup do
162
+ puts "#{'=' * 50} Running rake pages PROJ=#{ENV["PROJ"].inspect}"
163
+ raise 'No ENV["PROJ"]!' unless proj = ENV["PROJ"]
164
+ sh %{git checkout #{proj}-pages}
165
+ sh %{git reset --hard origin/#{proj}-pages}
166
+
167
+ sh %{rake build --trace}
168
+ sh %{rsync -av --delete site/ /var/www/#{proj}-pages}
169
+ end
166
170
  end
167
171
 
168
172
  # ----- Coverage -----
@@ -249,6 +253,14 @@ end
249
253
 
250
254
  # ----- Handling Updates -----
251
255
 
256
+ def ensure_git_cleanup
257
+ yield
258
+ ensure
259
+ sh %{git reset --hard HEAD}
260
+ sh %{git clean -xdf}
261
+ sh %{git checkout master}
262
+ end
263
+
252
264
  task :handle_update do
253
265
  unless ENV["REF"] =~ %r{^refs/heads/(master|(?:haml|sass)-pages)$}
254
266
  puts "#{'=' * 20} Ignoring rake handle_update REF=#{ENV["REF"].inspect}"
@@ -265,18 +277,12 @@ task :handle_update do
265
277
  sh %{git fetch origin}
266
278
  sh %{git reset --hard origin/master}
267
279
 
268
- begin
269
- if branch == "master"
270
- sh %{rake release_edge --trace}
271
- sh %{rake pages --trace PROJ=haml}
272
- sh %{rake pages --trace PROJ=sass}
273
- elsif branch =~ /^(haml|sass)-pages$/
274
- sh %{rake pages --trace PROJ=#{$1}}
275
- end
276
- ensure
277
- sh %{git reset --hard HEAD}
278
- sh %{git clean -xdf}
279
- sh %{git checkout master}
280
+ if branch == "master"
281
+ sh %{rake release_edge --trace}
282
+ sh %{rake pages --trace PROJ=haml}
283
+ sh %{rake pages --trace PROJ=sass}
284
+ elsif branch =~ /^(haml|sass)-pages$/
285
+ sh %{rake pages --trace PROJ=#{$1}}
280
286
  end
281
287
 
282
288
  puts 'Done running handle_update'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.49
1
+ 2.1.50
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.49
4
+ version: 2.1.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -44,10 +44,10 @@ extensions: []
44
44
 
45
45
  extra_rdoc_files:
46
46
  - README.md
47
+ - REVISION
47
48
  - MIT-LICENSE
48
49
  - VERSION
49
50
  - VERSION_NAME
50
- - REVISION
51
51
  - EDGE_GEM_VERSION
52
52
  files:
53
53
  - rails/init.rb
@@ -248,10 +248,10 @@ files:
248
248
  - Rakefile
249
249
  - init.rb
250
250
  - README.md
251
+ - REVISION
251
252
  - MIT-LICENSE
252
253
  - VERSION
253
254
  - VERSION_NAME
254
- - REVISION
255
255
  - EDGE_GEM_VERSION
256
256
  has_rdoc: true
257
257
  homepage: http://haml.hamptoncatlin.com/