-
Notifications
You must be signed in to change notification settings - Fork 47
/
Rakefile
39 lines (34 loc) · 962 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
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task default: :spec
namespace :docker do
desc 'Build docker image'
task :build do
sh 'docker build -t transmission-rss .'
end
desc 'Run docker image'
task :run do
sh '
touch \
$(pwd)/transmission-rss.conf \
$(pwd)/.seen
docker run \
-it \
--net host \
-v $(pwd)/transmission-rss.conf:/etc/transmission-rss.conf \
-v $(pwd)/.seen:/home/ruby/.config/transmission/seen \
transmission-rss
'
end
desc 'Publish docker image'
task :publish do
sh "
set -e
docker build -t nning2/transmission-rss:#{TransmissionRSS::VERSION} .
docker tag nning2/transmission-rss:#{TransmissionRSS::VERSION} nning2/transmission-rss:latest
docker push nning2/transmission-rss:#{TransmissionRSS::VERSION}
docker push nning2/transmission-rss:latest
"
end
end