diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 86a9c21..fc0db92 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -38,6 +38,7 @@ snapshot: release: prerelease: auto extra_files: + - glob: README.md - glob: LICENSE - glob: pgp.pub changelog: diff --git a/Makefile b/Makefile index 6d8923b..eda8fab 100644 --- a/Makefile +++ b/Makefile @@ -78,6 +78,9 @@ vet: build-dev: docker-build .build +install: docker-build + @go install -ldflags "-s -w -X '$(MODULE).Version=$(VERSION)' -X '$(MODULE).BuildDate=$(shell date)'" ./cmd/d2vm + .build: @go generate ./... @go build -o d2vm -ldflags "-s -w -X '$(MODULE).Version=$(VERSION)' -X '$(MODULE).BuildDate=$(shell date)'" ./cmd/d2vm diff --git a/README.md b/README.md index 1d5b50a..48b1c15 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,15 @@ Obviously, **Distroless** images are not supported. ### Install from release -Download the latest release for your platform from the [release page](https://github.com/linka-cloud/d2vm/releases/latest) +Download the latest release for your platform from the [release page](https://github.com/linka-cloud/d2vm/releases/latest). + +Extract the tarball: + +```bash +tar -xvzf .tar.gz +``` + +Move the extracted *d2vm* binary to somewhere in your `$PATH` (`/usr/local/bin` for most users). ### Install from source @@ -56,7 +64,15 @@ git clone https://github.com/linka-cloud/d2vm && cd d2vm Install using the *make*, *docker* and the Go tool chain: ```bash -make build-dev && sudo cp d2vm /usr/local/bin/ +make install +``` + +The *d2vm* binary is installed in the `$GOBIN` directory. + +```bash +which d2vm + +/go/bin/d2vm ``` ### Converting an existing Docker Image to VM image: