]> git.lizzy.rs Git - micro.git/commitdiff
Update makefile
authorZachary Yedidia <zyedidia@gmail.com>
Sun, 18 Jun 2017 13:54:07 +0000 (09:54 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Sun, 18 Jun 2017 13:54:07 +0000 (09:54 -0400)
Makefile

index da94f7981024bc56d8c530728be5d158ff523235..329d03d3abf739aec1da03dbc97cf8a79736ee7a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ ADDITIONAL_GO_LINKER_FLAGS := $(shell GOOS=$(shell go env GOHOSTOS) \
 GOBIN ?= $(shell go env GOPATH)/bin
 
 # Builds micro after checking dependencies but without updating the runtime
-build:
+build: update
        go build -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)' $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
 # Builds micro after building the runtime and checking dependencies
@@ -22,7 +22,7 @@ build-quick:
        go build -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)' $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
 # Same as 'build' but installs to $GOBIN afterward
-install:
+install: update
        go install -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)' $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
 # Same as 'build-all' but installs to $GOBIN afterward
@@ -32,6 +32,10 @@ install-all: runtime install
 install-quick:
        go install -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)' $(ADDITIONAL_GO_LINKER_FLAGS)"  ./cmd/micro
 
+update:
+       git pull
+       git submodule update
+
 # Builds the runtime
 runtime:
        go get -u github.com/jteeuwen/go-bindata/...