mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Makefile updates
This commit is contained in:
15
Makefile
15
Makefile
@@ -7,10 +7,10 @@ EXTERNAL_TOOLS=\
|
||||
golang.org/x/tools/cmd/cover \
|
||||
golang.org/x/tools/cmd/vet
|
||||
|
||||
all: test
|
||||
|
||||
all: deps format
|
||||
@mkdir -p bin/
|
||||
@bash --norc -i ./scripts/build.sh
|
||||
dev: deps format
|
||||
@NOMAD_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||
|
||||
bin:
|
||||
@sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||
@@ -21,19 +21,16 @@ cov:
|
||||
|
||||
deps:
|
||||
@echo "--> Installing build dependencies"
|
||||
@bash --norc scripts/deps.sh -d -v
|
||||
@DEP_ARGS="-d -v" sh -c "'$(CURDIR)/scripts/deps.sh'"
|
||||
|
||||
updatedeps: deps
|
||||
@echo "--> Updating build dependencies"
|
||||
@bash --norc scripts/deps.sh -d -f -u
|
||||
@DEP_ARGS="-d -f -u" sh -c "'$(CURDIR)/scripts/deps.sh'"
|
||||
|
||||
test: deps
|
||||
@./scripts/test.sh
|
||||
@sh -c "'$(CURDIR)/scripts/test.sh'"
|
||||
@$(MAKE) vet
|
||||
|
||||
integ:
|
||||
go list ./... | INTEG_TESTS=yes xargs -n1 go test
|
||||
|
||||
cover: deps
|
||||
go list ./... | xargs -n1 go test --cover
|
||||
|
||||
|
||||
14
README.md
14
README.md
@@ -96,12 +96,22 @@ $ make test
|
||||
...
|
||||
```
|
||||
|
||||
To compile a development version of Nomad, run `make`. This will put the
|
||||
To compile a development version of Nomad, run `make dev`. This will put the
|
||||
Nomad binary in the `bin` and `$GOPATH/bin` folders:
|
||||
|
||||
```sh
|
||||
$ make
|
||||
$ make dev
|
||||
...
|
||||
$ bin/nomad
|
||||
...
|
||||
```
|
||||
|
||||
To cross-compile Nomad, run `make bin`. This will compile Nomad for multiple
|
||||
platforms and place the resulting binaries into the `./pkg` directory:
|
||||
|
||||
```sh
|
||||
$ make bin
|
||||
...
|
||||
$ ls ./pkg
|
||||
...
|
||||
```
|
||||
|
||||
@@ -1,9 +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
|
||||
GOOS=windows go get $DEP_ARGS github.com/StackExchange/wmi
|
||||
GOOS=windows go get $DEP_ARGS github.com/shirou/w32
|
||||
|
||||
# Get the rest of the deps
|
||||
DEPS=$(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
||||
go get $@ ./... $DEPS
|
||||
go get $DEP_ARGS ./... $DEPS
|
||||
|
||||
Reference in New Issue
Block a user