diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-11-05 09:41:48 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-11-19 16:55:31 -0500 |
commit | 9b0a353d7976efbd628166c30766646b2bcc7ba1 (patch) | |
tree | 209828256078ac31fa3637c4ae9a74e0d2aff1d7 | |
parent | regex, remove unused (diff) |
makefile program version tagging for bin-archivedoc-reform_v0.8.2
-rw-r--r-- | makefile | 17 | ||||
-rw-r--r-- | org/dr_build_scaffold.org | 17 |
2 files changed, 18 insertions, 16 deletions
@@ -1,4 +1,5 @@ -PROJECT_VERSION :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) DUB=dub DUB_FLAGS=-v --force --compiler= PRG_NAME=doc-reform @@ -109,8 +110,8 @@ dmd_debug: $(DUB) --compiler=dmd --config=dmd -b debug dmd_ver: $(DUB) --compiler=dmd --config=dmd-version - mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROJECT_VERSION)-dmd - notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-dmd' + mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd + notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' dmd_clean_ver: clean tangle dmd_ver dmd_rel: expunge skel tangle $(DUB) --compiler=dmd --config=doc-reform-release @@ -125,8 +126,8 @@ gdc_debug: $(DUB) --compiler=gdc --config=gdc -b debug gdc_ver: $(DUB) --compiler=gdc --config=gdc-version - mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROJECT_VERSION)-gdc - notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-gdc' + mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc + notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' gdc_clean_ver: clean tangle gdc_ver gdc_rel: expunge skel tangle $(DUB) --compiler=gdc --config=doc-reform-release @@ -141,8 +142,8 @@ ldc_debug: $(DUB) --compiler=ldc2 --config=ldc -b debug ldc_ver: $(DUB) --compiler=ldc2 --config=ldc-version - mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROJECT_VERSION)-ldc - notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-ldc' + mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc + notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' ldc_clean_ver: clean tangle ldc_ver ldc_rel: expunge skel tangle $(DUB) --compiler=ldc2 --config=doc-reform-release @@ -193,7 +194,7 @@ distclean_and_init: expunge mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ mkdir -p $(PRG_BINDIR); ver: - echo doc-reform-$(PROJECT_VERSION) + echo doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) clean_tangle_build: clean tangle build tangle_build: tangle build build: $(PRG_SRCDIR)/$(PRG_SRC) diff --git a/org/dr_build_scaffold.org b/org/dr_build_scaffold.org index ca6b224..0b6d901 100644 --- a/org/dr_build_scaffold.org +++ b/org/dr_build_scaffold.org @@ -22,7 +22,8 @@ *** git version stamp :git:version: #+BEGIN_SRC makefile :tangle ../makefile -PROJECT_VERSION :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) #+END_SRC *** dub (build tool) :dub: @@ -253,8 +254,8 @@ dmd_debug: #+BEGIN_SRC makefile :tangle ../makefile dmd_ver: $(DUB) --compiler=dmd --config=dmd-version - mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROJECT_VERSION)-dmd - notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-dmd' + mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd + notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' dmd_clean_ver: clean tangle dmd_ver #+END_SRC @@ -293,8 +294,8 @@ gdc_debug: #+BEGIN_SRC makefile :tangle ../makefile gdc_ver: $(DUB) --compiler=gdc --config=gdc-version - mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROJECT_VERSION)-gdc - notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-gdc' + mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc + notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' gdc_clean_ver: clean tangle gdc_ver #+END_SRC @@ -333,8 +334,8 @@ ldc_debug: #+BEGIN_SRC makefile :tangle ../makefile ldc_ver: $(DUB) --compiler=ldc2 --config=ldc-version - mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROJECT_VERSION)-ldc - notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROJECT_VERSION)-ldc' + mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc + notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' ldc_clean_ver: clean tangle ldc_ver #+END_SRC @@ -401,7 +402,7 @@ distclean_and_init: expunge #+BEGIN_SRC makefile :tangle ../makefile ver: - echo doc-reform-$(PROJECT_VERSION) + echo doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) #+END_SRC ****** tangle build rebuild :clean:tangle:build: |