-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
42 lines (36 loc) · 1015 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
42
# frozen_string_literal: true
require 'bundler/setup'
require_relative 'lib/kamaze-docker_image'
require 'kamaze/docker_image'
require 'kamaze/project'
require 'sys/proc'
Sys::Proc.progname = nil
Kamaze.project do |project|
project.subject = Kamaze::DockerImage
project.name = 'kamaze-docker_image'
project.tasks = [
'cs:correct', 'cs:control', 'cs:pre-commit',
'doc', 'doc:watch',
'gem', 'gem:install', 'gem:push',
'misc:gitignore',
'shell', 'sources:license', 'test', 'version:edit',
]
end.load!
task default: [:gem]
if project.path('spec').directory?
task :spec do |task, args|
Rake::Task[:test].invoke(*args.to_a)
end
end
Kamaze::DockerImage.new do |config|
config.name = 'kamaze/sample_image'
config.version = '0.0.1'
config.path = 'image'
config.run_as = config.name.tr('/', '_')
config.tasks_ns = 'docker'
config.ssh = {
enabled: true,
}
end.tap do |image|
self.singleton_class.__send__(:define_method, :image) { image }
end