Set the version when installing via make install

Before:
    dagger devel () darwin/amd64

After:
    dagger devel (1d1b9083) darwin/amd64

Also removed the dependency on the dagger target, since go install is
very similar to go build, the only difference in this context is that it
places the binary in $GOPATH/bin.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
This commit is contained in:
Gerhard Lazu 2022-02-04 11:51:54 +00:00
parent 1d1b9083b3
commit c9a8159f28
No known key found for this signature in database
GPG Key ID: A28DE70C9444D7A6

View File

@ -25,8 +25,8 @@ dagger-debug: # Build a debug version of the dev dagger binary
go build -race -o ./cmd/dagger/dagger-debug -ldflags '-X go.dagger.io/dagger/version.Revision=$(GIT_REVISION)' ./cmd/dagger/ go build -race -o ./cmd/dagger/dagger-debug -ldflags '-X go.dagger.io/dagger/version.Revision=$(GIT_REVISION)' ./cmd/dagger/
.PHONY: install .PHONY: install
install: dagger # Build & install a dev dagger binary install: # Install a dev dagger binary
go install ./cmd/dagger go install -ldflags '-X go.dagger.io/dagger/version.Revision=$(GIT_REVISION)' ./cmd/dagger
.PHONY: test .PHONY: test
test: # Run all tests test: # Run all tests