Skip to content

Commit

Permalink
fix: build (#831)
Browse files Browse the repository at this point in the history
* fix: build

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix: build

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix: build

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix: build

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix: build

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Dec 2, 2022
1 parent efc33c2 commit 3d06ae8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
tf-version: [0.15.5, 1.0.11, 1.1.9, 1.2.9]
runs-on: ubuntu-latest
steps:
- name: Install goimports
run: go get golang.org/x/tools/cmd/goimports
- name: Install terraform
run: |
TERRAFORM_VERSION=${{ matrix.tf-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.ssl
.vscode
.tools

.terraform/
store/
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PROVIDER_VERSION := "0.0.1"
OS := $(shell echo `uname` | tr '[:upper:]' '[:lower:]')
PROVIDER_VERSION := "0.0.1"
OS := $(shell echo `uname` | tr '[:upper:]' '[:lower:]')
TOOLS_DIR := $(PWD)/.tools
GOIMPORTS := $(TOOLS_DIR)/goimports
GOIMPORTS_VERSION := latest

.PHONY: all
all: clean gen fmt build verify-gen vet test
Expand All @@ -17,17 +20,15 @@ clean:
@rm -rf ./docs/provider-config/*.md
@rm -rf ./docs/resources/*.md

.PHONY: install-goimports
install-goimports:
ifeq (, $(shell which goimports))
go install golang.org/x/tools/cmd/goimports@latest
endif
$(GOIMPORTS):
@echo Install goimports... >&2
@GOBIN=$(TOOLS_DIR) go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)

.PHONY: gen-tf-code
gen-tf-code: clean install-goimports
gen-tf-code: clean $(GOIMPORTS)
@go run ./hack/gen-tf-code/...
@go fmt ./pkg/schemas/...
@goimports -w ./pkg/schemas
@$(GOIMPORTS) -w ./pkg/schemas

.PHONY: gen
gen: gen-tf-code
Expand Down

0 comments on commit 3d06ae8

Please sign in to comment.