Make fixes for OS-specific deps

This commit is contained in:
Ryan Uber 2015-09-29 15:42:49 -07:00
parent 52a9694bed
commit 9b67f9bbe0
2 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,3 @@
DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
PACKAGES = $(shell go list ./...)
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
-nilfunc -printf -rangeloops -shift -structtags -unsafeptr
@ -22,11 +21,11 @@ cov:
deps:
@echo "--> Installing build dependencies"
@go get -d -v ./... $(DEPS)
@bash --norc scripts/deps.sh -d -v
updatedeps: deps
@echo "--> Updating build dependencies"
@go get -d -f -u ./... $(DEPS)
@bash --norc scripts/deps.sh -d -f -u
test: deps
@./scripts/test.sh

9
scripts/deps.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# First get the OS-specific packages
GOOS=windows go get $@ github.com/StackExchange/wmi
GOOS=windows go get $@ github.com/shirou/w32
# Get the rest of the deps
DEPS=$(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
go get $@ ./... $DEPS