Skip to content

Commit

Permalink
Merge pull request #3019 from monopole/installGh
Browse files Browse the repository at this point in the history
Install gh cli tool via make
  • Loading branch information
monopole authored Sep 20, 2020
2 parents 8285af8 + f86cb64 commit 9002c33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ $(MYGOBIN)/kustomize:
install-tools: \
$(MYGOBIN)/goimports \
$(MYGOBIN)/golangci-lint-kustomize \
$(MYGOBIN)/gh \
$(MYGOBIN)/gorepomod \
$(MYGOBIN)/mdrip \
$(MYGOBIN)/pluginator \
Expand Down Expand Up @@ -321,6 +322,18 @@ $(MYGOBIN)/kind:
rm -rf $$d; \
)

# linux only.
$(MYGOBIN)/gh:
( \
set -e; \
d=$(shell mktemp -d); cd $$d; \
tgzFile=gh_1.0.0_linux_amd64.tar.gz; \
wget https://github.com/cli/cli/releases/download/v1.0.0/$$tgzFile; \
tar -xvzf $$tgzFile; \
mv gh_1.0.0_linux_amd64/bin/gh $(MYGOBIN)/gh; \
rm -rf $$d \
)

.PHONY: clean
clean: kustomize-external-go-plugin-clean
go clean --cache
Expand Down

0 comments on commit 9002c33

Please sign in to comment.