add task to makefile for generating/updating CHANGES file before releases
parent
840c1ff103
commit
0e6c45ba19
|
@ -27,3 +27,7 @@ indent_size = 2
|
|||
[Makefile]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.sh]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
|
12
Makefile
12
Makefile
|
@ -8,7 +8,7 @@ RES_DIR320=gtk-3.20
|
|||
SCSS_DIR320=$(RES_DIR320)/scss
|
||||
DIST_DIR320=$(RES_DIR320)/dist
|
||||
INSTALL_DIR=$(DESTDIR)/usr/share/themes/Numix
|
||||
LATEST_STABLE_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
UTILS=scripts/utils.sh
|
||||
|
||||
all: clean gresource
|
||||
|
||||
|
@ -57,14 +57,8 @@ uninstall:
|
|||
rm -rf $(INSTALL_DIR)
|
||||
|
||||
changes:
|
||||
[ -f CHANGES ] && mv CHANGES CHANGES.old
|
||||
git log \
|
||||
--pretty=format:"[%ai] %<(69,trunc) %s %><(15) %aN {%h}" \
|
||||
--cherry-pick "${LATEST_STABLE_RELEASE}...HEAD" > CHANGES
|
||||
[ -f CHANGES.old ] && cat CHANGES.old >> CHANGES && rm CHANGES.old
|
||||
git add CHANGES
|
||||
git commit -m 'RELEASE PREP :: Update CHANGES file.'
|
||||
git push
|
||||
$(UTILS) changes
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: css
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
update_changes_file() {
|
||||
local LATEST_STABLE_RELEASE
|
||||
LATEST_STABLE_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
[[ -f CHANGES ]] && mv CHANGES CHANGES.old
|
||||
|
||||
{ git log \
|
||||
--pretty=format:"[%ai] %<(69,trunc) %s %><(15) %aN {%h}" \
|
||||
--cherry-pick "${LATEST_STABLE_RELEASE}...HEAD"; } > CHANGES
|
||||
|
||||
[[ -f CHANGES.old ]] && cat CHANGES.old >> CHANGES && rm CHANGES.old
|
||||
|
||||
git add CHANGES
|
||||
git commit -m 'RELEASE PREP :: Update CHANGES file.'
|
||||
git push
|
||||
}
|
||||
|
||||
|
||||
case $1 in
|
||||
changes)
|
||||
update_changes_file
|
||||
exit $?
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue