Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
add task to makefile for generating/updating CHANGES file before rele…
Browse files Browse the repository at this point in the history
…ases

(cherry picked from commit 0e6c45b)
  • Loading branch information
lots0logs committed Sep 18, 2016
1 parent 8ea97e1 commit 21358d8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ indent_size = 2
[Makefile]
indent_style = tab
indent_size = 4

[*.sh]
indent_style = tab
indent_size = 4
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RES_DIR320=gtk-3.20
SCSS_DIR320=$(RES_DIR320)/scss
DIST_DIR320=$(RES_DIR320)/dist
INSTALL_DIR=$(DESTDIR)/usr/share/themes/Numix-Frost
UTILS=scripts/utils.sh

all: clean gresource

Expand Down Expand Up @@ -54,6 +55,10 @@ install: all
uninstall:
rm -rf $(INSTALL_DIR)

changes:
$(UTILS) changes


.PHONY: all
.PHONY: css
.PHONY: watch
Expand Down
30 changes: 30 additions & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 21358d8

Please sign in to comment.