@@ -13,21 +13,6 @@ Rake::ExtensionTask.new("appmap") do |ext|
1313 ext . lib_dir = "lib/appmap"
1414end
1515
16- namespace 'gem' do
17- require 'bundler/gem_tasks'
18-
19- module Bundler
20- class GemHelper
21- # A handy tip - find the location of any Rake task using `rake -W`.
22- # rake -W build
23- # ~/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/gem_helper.rb:39:in `install'
24- def build_gem
25- raise "Don't use 'rake gem:build' - use 'yarn install --prod && gem build <gemspec>', because that's what ./release.sh does"
26- end
27- end
28- end
29- end
30-
3116RUBY_VERSIONS = %w[ 2.6 2.7 3.0 ] . select do |version |
3217 travis_ruby_version = ENV [ 'TRAVIS_RUBY_VERSION' ]
3318 next true unless travis_ruby_version
@@ -72,6 +57,11 @@ def build_app_image(app, ruby_version)
7257 end
7358end
7459
60+ desc 'Install non-Ruby dependencies'
61+ task :install do
62+ system 'yarn install' or raise 'yarn install failed'
63+ end
64+
7565namespace :build do
7666 namespace :base do
7767 RUBY_VERSIONS . each do |ruby_version |
@@ -80,7 +70,6 @@ namespace :build do
8070 run_system = -> ( cmd ) { system ( cmd ) or raise "Command failed: #{ cmd } " }
8171
8272 run_system . call 'mkdir -p pkg'
83- run_system . call 'yarn install --prod'
8473 run_system . call "gem build appmap.gemspec --output pkg/appmap-#{ GEM_VERSION } .gem"
8574 build_base_image ( ruby_version )
8675 end . tap do |t |
139128namespace :spec do
140129 RUBY_VERSIONS . each do |ruby_version |
141130 desc ruby_version
142- task ruby_version , [ :specs ] => [ "compile" , "build:fixtures:#{ ruby_version } :all" ] do |_ , task_args |
131+ task ruby_version , [ :specs ] => [ "install" , " compile", "build:fixtures:#{ ruby_version } :all" ] do |_ , task_args |
143132 run_specs ( ruby_version , task_args )
144133 end . tap do |t |
145134 desc "Run all specs"
0 commit comments