-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
41 lines (33 loc) · 909 Bytes
/
Rakefile
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
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
require "rubocop/rake_task"
require "bundler/audit/task"
Bundler::Audit::Task.new
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
RuboCop::RakeTask.new
task default: %i[test rubocop bundle:audit]
namespace :docker do
desc "Build docker image"
task :build do
require "shellwords"
require_relative "lib/statique/version"
cmd = [
"docker",
"buildx",
"build",
"--tag", "pusewicz/statique:#{Statique::VERSION}",
"--tag", "pusewicz/statique:latest",
"--build-arg", "RUBY_VERSION=#{File.read(".ruby-version").chomp}",
"--build-arg", "STATIQUE_VERSION=#{Statique::VERSION}",
"--platform", "linux/amd64,linux/arm64",
"."
]
puts cmd.shelljoin
system cmd.shelljoin
end
end