diff options
author | André Erdmann <dywi@mailerd.de> | 2014-04-02 21:55:36 +0200 |
---|---|---|
committer | André Erdmann <dywi@mailerd.de> | 2014-04-02 22:12:47 +0200 |
commit | 356e6985f87066652d625e20d0834f371aed253b (patch) | |
tree | 4f9f20e17128acc5f0a6d233d95d112d64256fed /Makefile | |
parent | bin/build/setver: --git-{add,commit,tag}, --reset (diff) | |
download | R_overlay-356e6985f87066652d625e20d0834f371aed253b.tar.gz R_overlay-356e6985f87066652d625e20d0834f371aed253b.tar.bz2 R_overlay-356e6985f87066652d625e20d0834f371aed253b.zip |
Makefile: add 'setver', 'version-bump' targets
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -16,6 +16,7 @@ BUILDDIR := ./tmp ROVERLAY_TARGET_TYPE := gentoo RELEASE_NOT_DIRTY := n RELEASE_DIRTY_SUFFIX := -dirty +VBUMP_COMMIT := y PYMOD_FILE_LIST := ./roverlay_files.list @@ -23,9 +24,11 @@ MANIFEST := $(CURDIR)/MANIFEST LICENSES_FILE := $(CURDIR)/files/licenses VERSION_FILE := $(CURDIR)/VERSION +X_GIT := git + MANIFEST_GEN := ./bin/build/create_manifest.sh LICENSES_GEN := ./bin/build/make-licenses.sh - +X_SETVER := ./bin/build/setver.sh RV_SETUP := ./bin/roverlay-setup SETUP_PY := ./setup.py @@ -57,6 +60,23 @@ PHONY += version version: @cat $(VERSION_FILE) +PHONY += setver +setver: $(X_SETVER) +ifeq ($(VER),) + $(error $$VER is not set.) +else + $< $(VER) +endif + +PHONY += version-bump +version-bump: $(X_SETVER) + { ! $(X_GIT) status --porcelain -- $(notdir $(VERSION_FILE)) | grep .; } +ifeq ($(VBUMP_COMMIT),$(filter $(VBUMP_COMMIT),y Y 1 yes YES true TRUE)) + X_GIT="$(X_GIT)" $< --reset --git-add --git-commit --git-tag + +else + X_GIT="$(X_GIT)" $< --reset --git-add + +endif + PHONY += test test: ./bin/run_tests ./bin/run_tests |