Skip to content

Commit

Permalink
Add prerelease task
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Mar 7, 2022
1 parent e66b3ec commit 5513121
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,19 @@ namespace :npm do
end
end

desc "Configure for pre-release"
task :configure_prerelease, [:prerel] do |t, args|
require "json"
prerel = args[:prerel]
NPM_PACKAGES.each do |pkg|
pkg_dir = "#{Dir.pwd}/packages/npm-packages/#{pkg[:name]}"
pkg_json = "#{pkg_dir}/package.json"
package = JSON.parse(File.read(pkg_json))
package["version"] += "-#{prerel}"
File.write(pkg_json, JSON.pretty_generate(package))
end
end

desc "Build all npm packages"
multitask :all => NPM_PACKAGES.map { |pkg| pkg[:name] }
end
Expand Down

0 comments on commit 5513121

Please sign in to comment.