Skip to content

Commit

Permalink
Fix templify
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed May 14, 2020
1 parent 9d51854 commit 2612f78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

SHELL = /bin/bash
OS = $(shell uname -s)
export PATH := $(abspath bin/):${PATH}

# Project variables
PACKAGE = github.com/banzaicloud/pke
Expand Down Expand Up @@ -51,17 +52,15 @@ pke-linux: ## Cross-compile pke for linux

.PHONY: gogenerate
gogenerate: bin/templify ## Generate go files from template
PATH=${PATH}:${PWD}/bin \
GOOS=linux go generate ./cmd/...
PATH=${PATH}:${PWD}/bin \
GOOS=darwin go generate ./cmd/...

bin/templify: bin/templify-${TEMPLIFY_VERSION}
@ln -sf templify-${TEMPLIFY_VERSION} bin/templify
bin/templify-${TEMPLIFY_VERSION}:
go get github.com/wlbr/templify@${TEMPLIFY_VERSION}
mkdir -p bin
@cp ${GOPATH}/bin/templify bin/templify-${TEMPLIFY_VERSION}
GOBIN=${PWD}/bin go get -modfile=tools/go.mod github.com/wlbr/templify@${TEMPLIFY_VERSION}
@mv bin/templify bin/templify-${TEMPLIFY_VERSION}

.PHONY: check
check: test lint ## Run tests and linters
Expand Down
5 changes: 5 additions & 0 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/banzaicloud/pke/tools

go 1.14

require github.com/wlbr/templify v0.0.0-20190526141042-7fafaccaaf15 // indirect
2 changes: 2 additions & 0 deletions tools/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/wlbr/templify v0.0.0-20190526141042-7fafaccaaf15 h1:VlfzKYAYQmd5sh2ORQ5ryTww7+/+RKhbLnt5Tz02w7Y=
github.com/wlbr/templify v0.0.0-20190526141042-7fafaccaaf15/go.mod h1:peULBi32hS7lLgRcjsxqMwOV0lN7AasP0PtVYapZwuA=

0 comments on commit 2612f78

Please sign in to comment.