Skip to content

Commit

Permalink
feat: run govulncheck on make dev
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrinds committed Sep 9, 2022
1 parent 6c986b7 commit bc051f4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ASUP_BIN_VERSION ?= main #change it to match tag of release branch
BIN_PLATFORM ?= linux
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
LINT_EXISTS := $(shell which golangci-lint)
GOVULNCHECK_EXISTS := $(shell which govulncheck)


help: ## Display this help
Expand Down Expand Up @@ -93,6 +94,15 @@ ifeq (${LINT_EXISTS}, )
endif
golangci-lint run

govulncheck: ## run govulncheck on the source files
ifeq (${GOVULNCHECK_EXISTS}, )
@echo
@echo "govulncheck task requires that you have https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck installed."
@echo
@exit 1
endif
govulncheck ./...

build: clean deps fmt harvest fetch-asup ## Build the project

package: clean deps build test dist-tar ## Package Harvest binary
Expand Down Expand Up @@ -154,7 +164,7 @@ asup:
@mkdir -p ${CURRENT_DIR}/autosupport
@cp ${ASUP_TMP}/harvest-asup/bin/asup ${CURRENT_DIR}/autosupport

dev: build lint
dev: build lint govulncheck
@echo "Deleting AutoSupport binary"
@rm -rf autosupport/asup

Expand Down

0 comments on commit bc051f4

Please sign in to comment.