mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-13 18:27:08 +00:00
This removes outputs from yaml, instead you can do ``` moby build -output tar -output qcow2 file.yaml ``` or alternative syntax ``` moby build -output tar,qcow2 file.yaml ``` In future we may change this to be available in a `moby package` step, but lets try this for now. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
31 lines
839 B
Makefile
31 lines
839 B
Makefile
VERSION="0.0" # dummy for now
|
|
GIT_COMMIT=$(shell git rev-list -1 HEAD)
|
|
|
|
default: moby
|
|
|
|
DEPS=$(wildcard cmd/moby/*.go) Makefile
|
|
PREFIX?=/usr/local
|
|
|
|
moby: $(DEPS) lint
|
|
go build --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ github.com/moby/tool/cmd/moby
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
@echo "+ $@: golint, gofmt, go vet"
|
|
# golint
|
|
@test -z "$(shell find . -type f -name "*.go" -not -path "./vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)"
|
|
# gofmt
|
|
@test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)"
|
|
# govet
|
|
@test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
|
|
# go test
|
|
@go test github.com/moby/tool/cmd/moby
|
|
|
|
test: moby
|
|
./moby build -output tar test/test.yml
|
|
rm moby test.tar
|
|
|
|
PHONY: install
|
|
install: moby
|
|
cp -a $^ $(PREFIX)/bin/
|