update Makefile to better switch to correct branch on updatedeps
This commit is contained in:
parent
87948b68fc
commit
a7cad594df
10
Makefile
10
Makefile
|
@ -22,14 +22,12 @@ testrace: generate
|
||||||
TF_ACC= go test -race $(TEST) $(TESTARGS)
|
TF_ACC= go test -race $(TEST) $(TESTARGS)
|
||||||
|
|
||||||
updatedeps:
|
updatedeps:
|
||||||
@# This just checks out the current branch/tag/commit again so
|
$(eval REF := $(shell sh -c "\
|
||||||
@# that the `git checkout -` works below. We do this to preserve our
|
git symbolic-ref --short HEAD 2>/dev/null \
|
||||||
@# location since `go get` always puts us back on the master branch.
|
|| git rev-parse HEAD"))
|
||||||
@sh -c "git checkout `git symbolic-ref --short HEAD 2>/dev/null \
|
|
||||||
|| git rev-parse HEAD`"
|
|
||||||
go get -u golang.org/x/tools/cmd/stringer
|
go get -u golang.org/x/tools/cmd/stringer
|
||||||
go get -f -u -v ./...
|
go get -f -u -v ./...
|
||||||
git checkout -
|
git checkout $(REF)
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
|
Loading…
Reference in New Issue