-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from Abirdcfly/make
feat: add make prepare-push
- Loading branch information
Showing
4 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -252,4 +252,21 @@ arctl: fmt vet ## Build manager binary. | |
gql-gen: | ||
@go run github.com/99designs/[email protected] generate | ||
build-graphql-server: gql-gen | ||
@CGO_ENABLED=0 GOOS=linux go build -o bin/graphql-server graphql-server/go-server/main.go | ||
@CGO_ENABLED=0 GOOS=linux go build -o bin/graphql-server graphql-server/go-server/main.go | ||
|
||
# prepare for git push | ||
.PHONY: prepare-push | ||
config_rule_line_num = $(shell grep -n "rules:" config/rbac/role.yaml | cut -d: -f1) | ||
chart_rule_line_num = $(shell grep -n "rules:" charts/arcadia/templates/rbac.yaml | cut -d: -f1) | ||
prepare-push: manifests generate fmt vet | ||
@echo "install golangci-lint" | ||
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
@echo "run golangci-lint with auto-fix" | ||
@golangci-lint run --fix -v ./... | ||
@echo "copy crds to charts" | ||
@cp config/crd/bases/* charts/arcadia/crds | ||
@echo "copy role to charts" | ||
@sed -n '$(config_rule_line_num),$$p' config/rbac/role.yaml > tmp_role.yaml | ||
@sed -i '' '$(chart_rule_line_num),$$d' charts/arcadia/templates/rbac.yaml | ||
@cat tmp_role.yaml >> charts/arcadia/templates/rbac.yaml | ||
@rm -f tmp_role.yaml |
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 |
---|---|---|
|
@@ -374,4 +374,3 @@ rules: | |
- get | ||
- patch | ||
- update | ||
|
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