summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-17 13:32:12 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-17 14:01:22 +0900
commit4885410da178171c074177b7e1d9cf71d270ca3e (patch)
treeb78a7600a672c872e62a2b371ef31a6941205353
parent40c5d7448c79fcd9700ac97ae9fe87c95cca61e2 (diff)
downloadjson-4885410da178171c074177b7e1d9cf71d270ca3e.tar.gz
Fixed broken build task for json and json_pure
-rw-r--r--Rakefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Rakefile b/Rakefile
index 5b42292..f48c377 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,12 +4,7 @@ rescue LoadError
end
require 'rbconfig'
-include\
- begin
- RbConfig
- rescue NameError
- Config
- end
+include RbConfig
require 'rake/clean'
CLOBBER.include 'doc', 'Gemfile.lock'
@@ -30,10 +25,8 @@ which = lambda { |c|
MAKE = ENV['MAKE'] || %w[gmake make].find(&which)
BUNDLE = ENV['BUNDLE'] || %w[bundle].find(&which)
-PKG_NAME = 'json'
-PKG_TITLE = 'JSON Implementation for Ruby'
+
PKG_VERSION = File.read('VERSION').chomp
-PKG_FILES = FileList[`git ls-files`.split(/\n/)]
EXT_ROOT_DIR = 'ext/json/ext'
EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser"
@@ -324,8 +317,17 @@ else
desc "Generate diagrams of ragel parser"
task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ]
+ desc "Create the gem packages"
+ task :package do
+ sh "gem build json.gemspec"
+ sh "gem build json_pure.gemspec"
+ mkdir_p 'pkg'
+ mv "json-#{PKG_VERSION}.gem", 'pkg'
+ mv "json_pure-#{PKG_VERSION}.gem", 'pkg'
+ end
+
desc "Build all gems and archives for a new release of json and json_pure."
- task :build => [ :clean, :gemspec, :package ]
+ task :build => [ :clean, :version, :package ]
task :release => :build
end