chore: continue building snapshots for acceptance tests

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow 2023-10-13 15:38:46 -04:00
parent 1b5e76977e
commit a8ceb73220
No known key found for this signature in database
GPG Key ID: 735988DA57708682

View File

@ -5,7 +5,7 @@ TEMP_DIR := ./.tmp
LINT_CMD := $(TEMP_DIR)/golangci-lint run --tests=false LINT_CMD := $(TEMP_DIR)/golangci-lint run --tests=false
GOIMPORTS_CMD := $(TEMP_DIR)/gosimports -local github.com/anchore GOIMPORTS_CMD := $(TEMP_DIR)/gosimports -local github.com/anchore
RELEASE_CMD := $(TEMP_DIR)/goreleaser release --clean RELEASE_CMD := $(TEMP_DIR)/goreleaser release --clean
SNAPSHOT_CMD := $(TEMP_DIR)/goreleaser build --clean --snapshot --single-target SNAPSHOT_CMD := $(RELEASE_CMD) --skip-publish --skip-sign --snapshot
CHRONICLE_CMD = $(TEMP_DIR)/chronicle CHRONICLE_CMD = $(TEMP_DIR)/chronicle
GLOW_CMD = $(TEMP_DIR)/glow GLOW_CMD = $(TEMP_DIR)/glow
@ -318,18 +318,16 @@ generate-cpe-dictionary-index: ## Build the CPE index based off of the latest a
build: build:
CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ ./cmd/syft CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ ./cmd/syft
.PHONY: $(SNAPSHOT_DIR) $(SNAPSHOT_DIR): ## Build snapshot release binaries and packages
$(SNAPSHOT_DIR): ## Build snapshot release for the current platform $(call title,Building snapshot artifacts)
$(call title,Building current platform snapshot artifact)
# create a config with the dist dir overridden # create a config with the dist dir overridden
echo "dist: $(SNAPSHOT_DIR)" > $(TEMP_DIR)/goreleaser.yaml echo "dist: $(SNAPSHOT_DIR)" > $(TEMP_DIR)/goreleaser.yaml
perl -0777pe 's/hooks:.*?quill.*?[.]log//s' .goreleaser.yaml >> $(TEMP_DIR)/goreleaser.yaml cat .goreleaser.yaml >> $(TEMP_DIR)/goreleaser.yaml
# build release snapshot # build release snapshots
$(SNAPSHOT_CMD) --config $(TEMP_DIR)/goreleaser.yaml $(SNAPSHOT_CMD) --config $(TEMP_DIR)/goreleaser.yaml
.PHONY: changelog .PHONY: changelog
changelog: clean-changelog ## Generate and show the changelog for the current unreleased version changelog: clean-changelog ## Generate and show the changelog for the current unreleased version
$(CHRONICLE_CMD) -vvv -n --version-file VERSION > $(CHANGELOG) $(CHRONICLE_CMD) -vvv -n --version-file VERSION > $(CHANGELOG)