File: Rakefile

package info (click to toggle)
ruby-adsf 1.4.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 276 kB
  • sloc: ruby: 717; makefile: 11
file content (29 lines) | stat: -rw-r--r-- 632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

require 'rubocop/rake_task'

RuboCop::RakeTask.new(:rubocop)

def sub_sh(dir, cmd)
  Bundler.with_clean_env do
    Dir.chdir(dir) do
      puts "(in #{Dir.getwd})"
      sh(cmd)
    end
  end
end

namespace :adsf do
  task(:test) { sub_sh('adsf', 'bundle exec rake test') }
  task(:gem) { sub_sh('adsf', 'bundle exec rake gem') }
end

namespace :adsf_live do
  task(:test) { sub_sh('adsf-live', 'bundle exec rake test') }
  task(:gem) { sub_sh('adsf-live', 'bundle exec rake gem') }
end

task test: %i[adsf:test adsf_live:test gem]
task gem: %i[adsf:gem adsf_live:gem]

task default: %i[test rubocop]