Made the "version" variable scope smaller.
This commit is contained in:
parent
c5cc545209
commit
db616f0b77
3
Rakefile
3
Rakefile
|
@ -1,8 +1,6 @@
|
||||||
require "net/http"
|
require "net/http"
|
||||||
require "uri"
|
require "uri"
|
||||||
|
|
||||||
version = File.read("VERSION").strip
|
|
||||||
|
|
||||||
desc "Build the minified parser runtime"
|
desc "Build the minified parser runtime"
|
||||||
task :minify do
|
task :minify do
|
||||||
response = Net::HTTP.post_form(
|
response = Net::HTTP.post_form(
|
||||||
|
@ -19,6 +17,7 @@ task :minify do
|
||||||
abort "Error calling Google Closure Compiler API: #{response.message}"
|
abort "Error calling Google Closure Compiler API: #{response.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
version = File.read("VERSION").strip
|
||||||
File.open("lib/pegjs-runtime-#{version}.min.js", "w") { |f| f.write(response.body) }
|
File.open("lib/pegjs-runtime-#{version}.min.js", "w") { |f| f.write(response.body) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue