1
0
Fork 0
golang-github-rhysd-go-gith.../Guardfile
Daniel Baumann e7ed09875d
Adding upstream version 1.2.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 09:45:13 +02:00

18 lines
493 B
Ruby

guard :shell do
watch /^selfupdate\/.+\.go$/ do |m|
puts "#{Time.now}: #{m[0]}"
case m[0]
when /_test\.go$/
parent = File.dirname m[0]
sources = Dir["#{parent}/*.go"].reject{|p| p.end_with? '_test.go'}.join(' ')
system "go test -v -short #{m[0]} #{sources}"
else
system 'go build ./selfupdate/'
end
end
watch /^cmd\/selfupdate-example\/.+\.go$/ do |m|
puts "#{Time.now}: #{m[0]}"
system 'go build ./cmd/selfupdate-example/'
end
end