forked from Cleafy/promqueen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
29 lines (27 loc) · 829 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
PKG = 'github.com/cleafy/promqueen'.freeze
task :ensure do
ln_sf ENV['PWD'], "#{ENV['GOPATH']}/src/#{PKG}"
sh "cd #{ENV['GOPATH']}/src/#{PKG} && dep ensure"
cd ENV['PWD']
Dir.chdir('vendor') do
Dir['*/*/*'].each do |d|
puts "Linking #{d} into #{ENV['GOPATH']}"
rm_rf "#{ENV['GOPATH']}/src/#{d}"
mkdir_p "#{ENV['GOPATH']}/src/#{File.dirname(d)}"
ln_sf "#{Dir.pwd}/#{d}", "#{ENV['GOPATH']}/src/#{d}"
end
end
end
task :update do
ln_sf ENV['PWD'], "#{ENV['GOPATH']}/src/#{PKG}"
sh "cd #{ENV['GOPATH']}/src/#{PKG} && dep ensure -update"
cd ENV['PWD']
Dir.chdir('vendor') do
Dir['*/*/*'].each do |d|
puts "Linking #{d} into #{ENV['GOPATH']}"
rm_rf "#{ENV['GOPATH']}/src/#{d}"
mkdir_p "#{ENV['GOPATH']}/src/#{File.dirname(d)}"
ln_sf "#{Dir.pwd}/#{d}", "#{ENV['GOPATH']}/src/#{d}"
end
end
end