Skip to content

Commit 040b869

Browse files
committed
add task to makefile for generating/updating CHANGES file before releases
1 parent 44d407e commit 040b869

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RES_DIR320=gtk-3.20
88
SCSS_DIR320=$(RES_DIR320)/scss
99
DIST_DIR320=$(RES_DIR320)/dist
1010
INSTALL_DIR=$(DESTDIR)/usr/share/themes/Numix
11+
LATEST_STABLE_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
1112

1213
all: clean gresource
1314

@@ -55,13 +56,24 @@ install: all
5556
uninstall:
5657
rm -rf $(INSTALL_DIR)
5758

59+
changes:
60+
[ -f CHANGES ] && mv CHANGES CHANGES.old
61+
git log \
62+
--pretty=format:"[%ai] %<(69,trunc) %s %><(15) %aN {%h}" \
63+
--cherry-pick "${LATEST_STABLE_RELEASE}...HEAD" > CHANGES
64+
[ -f CHANGES.old ] && cat CHANGES.old >> CHANGES && rm CHANGES.old
65+
git add CHANGES
66+
git commit -m 'RELEASE PREP :: Update CHANGES file.'
67+
git push
68+
5869
.PHONY: all
5970
.PHONY: css
6071
.PHONY: watch
6172
.PHONY: gresource
6273
.PHONY: clean
6374
.PHONY: install
6475
.PHONY: uninstall
76+
.PHONY: changes
6577

6678
.DEFAULT_GOAL := all
6779

0 commit comments

Comments
 (0)