Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Update rakefile to use modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpherrinm committed Aug 8, 2019
1 parent 47c30d5 commit d23dcd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ before_install:

install:
- gem install rake
- go get github.com/tools/godep
- go get github.com/kisielk/errcheck
- rake install
- wget https://releases.hashicorp.com/consul/0.7.1/consul_0.7.1_linux_amd64.zip
Expand Down
17 changes: 6 additions & 11 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@ require "json"

def e(cmd)
puts cmd
system(cmd) || raise("Error running `#{cmd}`")
system({"GO111MODULE" => "on"}, cmd) || raise("Error running `#{cmd}`")
end

def target(expand="")
root = File.dirname(__FILE__)
File.expand_path(expand, File.join(root, 'target'))
end

task :godep_check do
system("which godep") || abort("You do not have godep installed. Run `go get github.com/tools/godep` and ensure that it's on your PATH")
end

desc 'Get deps for all projects.'
task :deps => :godep_check do
e "go get -v -t ./..."
e "godep save ./..."
desc 'Vendor dependencies for all projects.'
task :deps do
e "go mod vendor"
end

desc 'Build all projects'
Expand All @@ -38,9 +33,9 @@ task :test_all => [:build] do
end

desc 'Update all dependencies'
task :update => :godep_check do
task :update do
e "go get -u -t -v ./..."
e "godep update -r .../..."
e "go mod vendor"
end

desc 'Install all built binaries'
Expand Down

0 comments on commit d23dcd0

Please sign in to comment.