diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1521c8b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2c12e15..2fa3bef 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,6 +12,11 @@ builds: - arm64 snapshot: name_template: "{{ incpatch .Version }}-next" +archives: + - files: + - src: scripts/docker-credential-gcloud + dst: "." + strip_parent: true changelog: sort: asc filters: diff --git a/README.md b/README.md index a9808ef..3052360 100644 --- a/README.md +++ b/README.md @@ -13,22 +13,24 @@ echo $PATH /home/alex/go/bin:/opt/google-cloud-sdk/bin/ ``` -### Install with go +If you do not install via the release, you must manually install `scripts/docker-credential-gcloud`. + +### Install from release ``` -go install github.com/gartnera/gcloud@latest +curl -L https://github.com/gartnera/gcloud/releases/download/v0.0.7/gcloud_0.0.7_linux_amd64.tar.gz | tar xz -C /usr/local/bin ``` -### Install from release +or ``` -curl -L https://github.com/gartnera/gcloud/releases/download/v0.0.1/gcloud_0.0.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin +wget -O - https://github.com/gartnera/gcloud/releases/download/v0.0.7/gcloud_0.0.7_linux_amd64.tar.gz | tar xz -C /usr/local/bin ``` -or +### Install with go ``` -wget -O - https://github.com/gartnera/gcloud/releases/download/v0.0.1/gcloud_0.0.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin +go install github.com/gartnera/gcloud@latest ``` ## Supported Commands diff --git a/scripts/docker-credential-gcloud b/scripts/docker-credential-gcloud new file mode 100755 index 0000000..3a354c3 --- /dev/null +++ b/scripts/docker-credential-gcloud @@ -0,0 +1,3 @@ +#!/bin/bash + +gcloud auth docker-helper $@ \ No newline at end of file