forked from mroth/scmpuff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
56 lines (46 loc) · 1.4 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
require 'rake/clean'
# special case: we have a bindata file which should be regenerated if source
# file changes. this is needed during development only, so we handle that here
# versus in the build script.
BINDATA = "commands/inits/bindata.go"
file BINDATA => :generate
CLEAN.include FileList.new("tmp/*")
# convenience bootstrap all for getting started
desc "bootstrap all gotool dependencies"
task :bootstrap do
sh "script/bootstrap"
end
# runs the generate script, which will bootstrap anything it needs in script
desc "generates bindata files"
task :generate do
sh "script/generate"
end
# the unix build script does not force `generate` as prereq, but the task here
# does since we want to always make sure to be up to date with any changes made
desc "builds the binary"
task :build => :generate do
sh "script/build"
end
desc "builds & installs the binary to $GOPATH/bin"
task :install => :build do
cp "bin/scmpuff", "#{ENV['GOPATH']}/bin/scmpuff"
end
desc "run unit tests"
task :test => BINDATA do
sh "go test ./..."
end
desc "run integration tests"
task :features => :build do
sh "cucumber -s --tags=~@wip"
end
task "features:wip" => :build do
sh "cucumber -s --tags=@wip"
end
desc "package for distribution"
task :package do
tagged_version = `script/version`.chomp()
sh "goxc -pv='#{tagged_version}'"
end
CLOBBER.include "builds"
task :all => [:build, :test, :features]
task :default => :all