diff --git a/.editorconfig b/.editorconfig index 169cf9a37..cc429788c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -27,3 +27,7 @@ indent_size = 2 [Makefile] indent_style = tab indent_size = 4 + +[*.sh] +indent_style = tab +indent_size = 4 diff --git a/Makefile b/Makefile index b2f41c5d4..4496973af 100755 --- a/Makefile +++ b/Makefile @@ -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 @@ -54,6 +55,10 @@ install: all uninstall: rm -rf $(INSTALL_DIR) +changes: + $(UTILS) changes + + .PHONY: all .PHONY: css .PHONY: watch diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100755 index 000000000..aa28265cc --- /dev/null +++ b/scripts/utils.sh @@ -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