Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/.vscode/

/bin/

cover.out
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ linters-settings:
check-exported: true

unparam:
algo: rta
check-exported: true

linters:
enable-all: true
disable:
- scopelint # too many false positives
- scopelint # too many false positives
- gochecknoglobals # mostly useless

issues:
exclude-use-default: false
Expand Down
25 changes: 21 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ help: ## Display this help message.
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \
awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}'

PMM_RELEASE_VERSION ?= 2.0.0-dev
PMM_RELEASE_TIMESTAMP = $(shell date '+%s')
PMM_RELEASE_FULLCOMMIT = $(shell git rev-parse HEAD)
PMM_RELEASE_BRANCH = $(shell git describe --all --contains --dirty HEAD)

release: ## Build bin/pmm-managed release binary.
go build -v -o bin/pmm-managed -ldflags " \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.ProjectName=pmm-managed' \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.Version=$(PMM_RELEASE_VERSION)' \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.PMMVersion=$(PMM_RELEASE_VERSION)' \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.Timestamp=$(PMM_RELEASE_TIMESTAMP)' \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.FullCommit=$(PMM_RELEASE_FULLCOMMIT)' \
-X 'github.com/percona/pmm-managed/vendor/github.com/percona/pmm/version.Branch=$(PMM_RELEASE_BRANCH)' \
"

RUN_FLAGS = -swagger=json -debug \
-agent-mysqld-exporter=mysqld_exporter \
-agent-postgres-exporter=postgres_exporter \
Expand Down Expand Up @@ -70,8 +85,11 @@ check-license: ## Check that all files have the same license he
check: install check-license ## Run checkers and linters.
golangci-lint run

format: ## Run `goimports`.
goimports -local github.com/percona/pmm-managed -l -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
FILES = $(shell find . -type f -name '*.go' -not -path "./vendor/*")

format: ## Format source code.
gofmt -w -s $(FILES)
goimports -local github.com/percona/pmm-managed -l -w $(FILES)

run: install _run ## Run pmm-managed.

Expand All @@ -80,8 +98,7 @@ run-race: install-race _run ## Run pmm-managed with race detector.
run-race-cover: install-race ## Run pmm-managed with race detector and collect coverage information.
go test -coverpkg="github.com/percona/pmm-managed/..." \
-tags maincover \
-race -c -o bin/pmm-managed.test \
github.com/percona/pmm-managed/cmd/pmm-managed
-race -c -o bin/pmm-managed.test
bin/pmm-managed.test -test.coverprofile=cover.out -test.run=TestMainCover $(RUN_FLAGS)

_run:
Expand Down
15 changes: 5 additions & 10 deletions api/annotations.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/base.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/demo.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/logs.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 5 additions & 28 deletions api/mysql.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 5 additions & 28 deletions api/postgresql.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 15 additions & 39 deletions api/rds.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/remote.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading