Mercurial > gemma
changeset 1014:77202406b1a7
reverted demo build target, include revision number based on version tag
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 23 Oct 2018 13:05:47 +0200 |
parents | 15c3cc6f29a4 |
children | d2f30a784fb3 |
files | Makefile client/Makefile.build client/package.json client/src/application/stores/application.js client/src/identify/Identify.vue |
diffstat | 5 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Oct 23 12:08:49 2018 +0200 +++ b/Makefile Tue Oct 23 13:05:47 2018 +0200 @@ -14,12 +14,10 @@ 3rdpartylibs-stamp := $(BUILDBASE)/3rdpartylibs-build -.PHONY: all demo 3rdpartylibs gemma client clientdemo clean +.PHONY: all 3rdpartylibs gemma client clean all: gemma client -demo: gemma clientdemo - $(ENVWARPPER): @echo "Preparing go build environment:" mkdir -p "$(GOCACHE)" @@ -45,9 +43,6 @@ client: $(MAKE) -f Makefile.build -C client -clientdemo: - $(MAKE) demo -f Makefile.build -C client - install: gemma cp cmd/gemma/gemma $(BINDIR)
--- a/client/Makefile.build Tue Oct 23 12:08:49 2018 +0200 +++ b/client/Makefile.build Tue Oct 23 13:05:47 2018 +0200 @@ -1,14 +1,11 @@ #-*-makefile-*- # Authors: Sascha Wilde <wilde@intevation.de> -.PHONY: all demo dependencies clean +.PHONY: all dependencies clean all: dependencies yarn build -demo: dependencies - yarn build-demo - dependencies: yarn install --check-files
--- a/client/package.json Tue Oct 23 12:08:49 2018 +0200 +++ b/client/package.json Tue Oct 23 13:05:47 2018 +0200 @@ -1,12 +1,11 @@ { "name": "gemmajs", - "version": "0.1.0", + "version": "0.1.0-dev", "private": true, "scripts": { "run:both": "concurrently \"../cmd/gemma/gemma\" \"vue-cli-service serve\"", - "serve": "VUE_APP_HGREV=$(hg id -i) vue-cli-service serve", - "build": "vue-cli-service build", - "build-demo": "VUE_APP_HGREV=$(hg id -i) vue-cli-service build", + "serve": "VUE_APP_HGREV=$(hg log -l1 --template \"{data|shortdate}-{node|short}\") vue-cli-service serve", + "build": "VUE_APP_HGREV=$(hg log -l1 --template \"{data|shortdate}-{node|short}\") vue-cli-service build", "lint": "vue-cli-service lint", "test:unit": "vue-cli-service test:unit", "test:e2e": "vue-cli-service test:e2e"
--- a/client/src/application/stores/application.js Tue Oct 23 12:08:49 2018 +0200 +++ b/client/src/application/stores/application.js Tue Oct 23 13:05:47 2018 +0200 @@ -1,3 +1,5 @@ +import { version } from "../../../package.json"; + const defaultCollapseState = true; const initializeSplitScreen = () => { @@ -24,7 +26,8 @@ iscollapsed: defaultCollapseState }, countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"], - drawMode: null + drawMode: null, + version }, getters: { countries: state => { @@ -50,6 +53,21 @@ }, drawMode: state => { return state.drawMode; + }, + versionStr: state => { + // version number from package.json + let versionStr = "v" + state.version; + + // hg revision + if ( + process.env.VUE_APP_HGREV && ( + state.version.includes('dev') || + state.version.includes('beta') || + state.version.includes('alpha') + ) + ) versionStr += " " + process.env.VUE_APP_HGREV; + + return versionStr; } }, mutations: {
--- a/client/src/identify/Identify.vue Tue Oct 23 12:08:49 2018 +0200 +++ b/client/src/identify/Identify.vue Tue Oct 23 13:05:47 2018 +0200 @@ -23,7 +23,7 @@ </div> <div class="versioninfo"> <hr /> - gemma <a href="https://hg.intevation.de/gemma/file/tip">source-code</a> {{ version }} + gemma <a href="https://hg.intevation.de/gemma/file/tip">source-code</a> {{ versionStr }} <br /> Some data © <a href="https://www.openstreetmap.org/copyright">OpenSteetMap</a> contributors @@ -79,7 +79,7 @@ <script> import { mapState } from "vuex"; -import { version } from "../../package.json"; +import { mapGetters } from "vuex"; export default { name: "identify", @@ -89,6 +89,7 @@ }; }, computed: { + ...mapGetters("application", ["versionStr"]), ...mapState("identifystore", ["identifiedFeatures"]), identifyStyle() { return { @@ -107,16 +108,6 @@ this.identifiedFeatures && this.identifiedFeatures.length > 0 }; }, - version() { - // version number from package.json - let versionStr = "v" + version; - - // hg revision - if (process.env.VUE_APP_HGREV) - versionStr += "-rev-" + process.env.VUE_APP_HGREV; - - return versionStr; - } }, methods: { collapse() {