Skip to content

Commit f1dfab9

Browse files
author
sg
committed
add changelog target to the makefile
1 parent 4431ab5 commit f1dfab9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,11 @@ dep-update-proto: build-buf-container
349349
########################################
350350
########### RELEASE UTILITIES ##########
351351
########################################
352-
.PHONY: check-branch check-tag-message patch-release-tag new-minor-release-tag new-major-release-tag
353-
352+
.PHONY: check-branch check-tag-message patch-release-tag new-minor-release-tag new-major-release-tag install-changelog-tool
353+
354+
install-changelog-tool:
355+
@go install github.com/smithy-security/smithy/cmd/changelog
356+
354357
check-branch:
355358
@if [ $$(git branch --show-current | tr -d '\n') != "main" ]; \
356359
then \
@@ -369,19 +372,25 @@ new-patch-release-tag: SHELL:=/bin/bash
369372
new-patch-release-tag: check-branch check-tag-message
370373
$(shell \
371374
read -a number <<< $$(git tag -l | sort -Vr | head -n 1 | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\1 \2 \3/'); \
375+
TAG_MESSAGE="${TAG_MESSAGE}\n\n$$(changelog -repo-path=.)" \
372376
git tag "v$${number[0]}.$${number[1]}.$$(($${number[2]}+1))" -m "${TAG_MESSAGE}"; \
373377
)
374378

375379
new-minor-release-tag: SHELL:=/bin/bash
376380
new-minor-release-tag: check-branch check-tag-message
377381
$(shell \
378382
read -a number <<< $$(git tag -l | sort -Vr | head -n 1 | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\1 \2 \3/'); \
383+
TAG_MESSAGE="${TAG_MESSAGE}\n\n$$(changelog -repo-path=.)" \
379384
git tag "v$${number[0]}.$$(($${number[1]}+1)).0" -m "${TAG_MESSAGE}"; \
380385
)
381386

382387
new-major-release-tag: SHELL:=/bin/bash
383388
new-major-release-tag: check-branch check-tag-message
384389
$(shell \
385390
read -a number <<< $$(git tag -l | sort -Vr | head -n 1 | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\1 \2 \3/'); \
391+
TAG_MESSAGE="${TAG_MESSAGE}\n\n$$(changelog -repo-path=.)" \
386392
git tag "v$$(($${number[0]}+1)).0.0" -m "${TAG_MESSAGE}"; \
387393
)
394+
395+
changelog:
396+
@changelog -repo-path="."

0 commit comments

Comments
 (0)