mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
adding docker push support again to Make and fixed a go vet nit
This commit is contained in:
1 parent
648a7ba577
commit
4f0c9dcede
3 files changed
+45
-40
No files matched your search
@@ -3,6 +3,7 @@
|
||||
VERSION := `git fetch --tags && git tag | sort -V | tail -1`
|
||||
PKG=github.com/zricethezav/gitleaks
|
||||
LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/version.Version=$(VERSION)"
|
||||
_LDFLAGS="github.com/zricethezav/gitleaks/version.Version=$(VERSION)"
|
||||
COVER=--cover --coverprofile=cover.out
|
||||
|
||||
test-cover:
|
||||
@@ -12,6 +13,7 @@ test-cover:
|
||||
test:
|
||||
go get golang.org/x/lint/golint
|
||||
go fmt ./...
|
||||
go vet ./...
|
||||
golint ./...
|
||||
go test ./... --race $(PKG) -v
|
||||
|
||||
@@ -21,6 +23,7 @@ test-integration:
|
||||
build:
|
||||
go fmt ./...
|
||||
golint ./...
|
||||
go vet ./...
|
||||
go mod tidy
|
||||
go build $(LDFLAGS)
|
||||
|
||||
@@ -37,6 +40,6 @@ release-builds:
|
||||
|
||||
deploy:
|
||||
@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
|
||||
docker build -f Dockerfile -t $(REPO):$(TAG) .
|
||||
echo "Pushing $(REPO):$(COMMIT) $(REPO):$(TAG)"
|
||||
docker push $(REPO)
|
||||
docker build --build-arg ldflags=$(_LDFLAGS) -f Dockerfile -t zricethezav/gitleaks:latest -t zricethezav/gitleaks:$(VERSION) .
|
||||
echo "Pushing zricethezav/gitleaks:$(VERSION) and zricethezav/gitleaks:latest"
|
||||
docker push zricethezav/gitleaks
|
||||
Reference in new issue
Block a user