pin the two tags used for release autochangelog

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman 2020-09-25 17:57:51 -04:00
parent 50cb5612d0
commit 6d9f9a9b3b
No known key found for this signature in database
GPG Key ID: 5CB45AE22BAB7EA7
2 changed files with 8 additions and 2 deletions

View File

@ -127,7 +127,7 @@ jobs:
with:
status: ${{ job.status }}
fields: repo,workflow,action,eventName
text: "A new Syft release is ready to be (manually) published from the GitHub Releases page"
text: "A new Syft release is ready to be (manually) published from https://github.com/anchore/syft/releases"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
if: ${{ success() }}

View File

@ -27,6 +27,9 @@ ifeq "$(strip $(VERSION))" ""
override VERSION = $(shell git describe --always --tags --dirty)
endif
# used to generate the changelog from the second to last tag to the current tag (used in the release pipeline when the release tag is in place)
SECOND_TO_LAST_TAG := $(shell git describe --abbrev=0 --tags $(shell git rev-list --tags --skip=1 --max-count=1))
## Variable assertions
ifndef TEMPDIR
@ -228,6 +231,8 @@ acceptance-test-rpm-package-install: $(SNAPSHOTDIR)
.PHONY: changlog-release
changelog-release:
@echo "Last tag: $(SECOND_TO_LAST_TAG)"
@echo "Current tag: $(VERSION)"
@docker run -i --rm \
-v "$(shell pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator \
--user anchore \
@ -236,7 +241,8 @@ changelog-release:
--no-pr-wo-labels \
--no-issues-wo-labels \
--unreleased-only \
--future-release $(VERSION)
--since-tag $(SECOND_TO_LAST_TAG) \
--due-tag $(VERSION)
.PHONY: changelog-unreleased
changelog-unreleased: ## show the current changelog that will be produced on the next release (note: requires GITHUB_TOKEN set)