forked from argoproj-labs/terraform-provider-argocd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate provider docs (argoproj-labs#229)
- Loading branch information
1 parent
16a40e9
commit e02838d
Showing
52 changed files
with
2,009 additions
and
1,184 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,43 @@ | ||
TEST?=./... | ||
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) | ||
PKG_NAME=pass | ||
default: build | ||
|
||
BINARY=terraform-provider-argocd | ||
VERSION = $(shell git describe --always) | ||
ARGOCD_INSECURE?=true | ||
ARGOCD_SERVER?=127.0.0.1:8080 | ||
ARGOCD_AUTH_USERNAME?=admin | ||
ARGOCD_AUTH_PASSWORD?=acceptancetesting | ||
ARGOCD_CONTEXT?=kind-argocd | ||
ARGOCD_VERSION?=v2.5.0 | ||
|
||
default: build-all | ||
export | ||
|
||
build-all: linux windows darwin freebsd | ||
build: | ||
go build -v ./... | ||
|
||
install: fmtcheck | ||
go install | ||
install: build | ||
go install -v ./... | ||
|
||
linux: fmtcheck | ||
@mkdir -p bin/ | ||
GOOS=linux GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_linux_amd64 | ||
GOOS=linux GOARCH=386 go build -v -o bin/$(BINARY)_$(VERSION)_linux_x86 | ||
|
||
windows: fmtcheck | ||
@mkdir -p bin/ | ||
GOOS=windows GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_windows_amd64 | ||
GOOS=windows GOARCH=386 go build -v -o bin/$(BINARY)_$(VERSION)_windows_x86 | ||
|
||
darwin: fmtcheck | ||
@mkdir -p bin/ | ||
GOOS=darwin GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_amd64 | ||
GOOS=darwin GOARCH=arm64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_arm64 | ||
|
||
freebsd: fmtcheck | ||
@mkdir -p bin/ | ||
GOOS=freebsd GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_freebsd_amd64 | ||
GOOS=freebsd GOARCH=386 go build -v -o bin/$(BINARY)_$(VERSION)_freebsd_x86 | ||
# See https://golangci-lint.run/ | ||
lint: | ||
golangci-lint run | ||
|
||
release: clean linux windows darwin freebsd | ||
for f in $(shell ls bin/); do zip bin/$${f}.zip bin/$${f}; done | ||
generate: | ||
go generate ./... | ||
|
||
clean: | ||
git clean -fXd -e \!vendor -e \!vendor/**/* -e \!.vscode | ||
fmt: | ||
gofmt -s -w -e . | ||
|
||
test: fmtcheck | ||
go test $(TEST) -timeout=30s -parallel=4 | ||
|
||
testacc_prepare_env: | ||
sh scripts/testacc_prepare_env.sh | ||
test: | ||
go test -v -cover -timeout=120s -parallel=4 ./... | ||
|
||
testacc: | ||
sh scripts/testacc.sh | ||
TF_ACC=1 go test -v -cover -timeout 8m ./... | ||
|
||
testacc_clean_env: | ||
kind delete cluster --name argocd | ||
|
||
fmt: | ||
@echo "==> Fixing source code with gofmt..." | ||
gofmt -s -w ./$(PKG_NAME) | ||
|
||
# Currently required by tf-deploy compile | ||
fmtcheck: | ||
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" | ||
|
||
lint: | ||
@echo "==> Checking source code against linters..." | ||
@GOGC=30 golangci-lint run ./$(PKG_NAME) | ||
|
||
test-compile: | ||
@if [ "$(TEST)" = "./..." ]; then \ | ||
echo "ERROR: Set TEST to a specific package. For example,"; \ | ||
echo " make test-compile TEST=./$(PKG_NAME)"; \ | ||
exit 1; \ | ||
fi | ||
go test -c $(TEST) $(TESTARGS) | ||
|
||
vendor: | ||
go mod tidy | ||
go mod vendor | ||
|
||
vet: | ||
go vet $< | ||
testacc_prepare_env: | ||
sh scripts/testacc_prepare_env.sh | ||
|
||
clean: | ||
git clean -fXd -e \!vendor -e \!vendor/**/* -e \!.vscode | ||
|
||
.PHONY: build test testacc_prepare_env testacc testacc_clean_env fmt fmtcheck lint test-compile vendor | ||
.PHONY: build install lint generate fmt test testacc testacc_clean_env testacc_prepare_env clean |
Oops, something went wrong.