diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 47 |
1 files changed, 19 insertions, 28 deletions
@@ -1,26 +1,19 @@ -# Makefile used to build XDS daemon Web Server - -# Application Version -VERSION := 0.3.4 +# Makefile used to build XDS Server # Syncthing version to install -SYNCTHING_VERSION = 0.14.28 -SYNCTHING_INOTIFY_VERSION = 0.8.6 - - -# Retrieve git tag/commit to set sub-version string -ifeq ($(origin SUB_VERSION), undefined) - SUB_VERSION := $(shell git describe --exact-match --tags 2>/dev/null | sed 's/^v//') - ifneq ($(SUB_VERSION), ) - VERSION := $(firstword $(subst -, ,$(SUB_VERSION))) - SUB_VERSION := $(word 2,$(subst -, ,$(SUB_VERSION))) - endif - ifeq ($(SUB_VERSION), ) - SUB_VERSION := $(shell git rev-parse --short HEAD) - ifeq ($(SUB_VERSION), ) - SUB_VERSION := unknown-dev - endif - endif +SYNCTHING_VERSION = 0.14.38 +SYNCTHING_INOTIFY_VERSION = 0.8.7 + + +# Retrieve git tag/commit to set version & sub-version strings +GIT_DESC := $(shell git describe --always --tags) +VERSION := $(firstword $(subst -, ,$(GIT_DESC))) +SUB_VERSION := $(subst $(VERSION)-,,$(GIT_DESC)) +ifeq ($(VERSION), ) + VERSION := unknown-dev +endif +ifeq ($(SUB_VERSION), ) + SUB_VERSION := $(shell date +'%Y-%m-%d_%H%M%S') endif # for backward compatibility @@ -103,7 +96,7 @@ fmt: tools/glide run: build/xds tools/syncthing/copytobin $(LOCAL_BINDIR)/xds-server$(EXT) --log info -c config.json.in -debug: build/xds webapp/debug tools/syncthing/copytobin +debug: build/xds tools/syncthing/copytobin $(LOCAL_BINDIR)/xds-server$(EXT) --log debug -c config.json.in .PHONY: clean @@ -112,17 +105,15 @@ clean: .PHONY: distclean distclean: clean - rm -rf $(LOCAL_BINDIR) $(ROOT_SRCDIR)/tools glide.lock vendor webapp/node_modules webapp/dist webapp/assets/xds-agent-tarballs/*.zip + rm -rf $(LOCAL_BINDIR) $(ROOT_SRCDIR)/tools glide.lock vendor $(ROOT_SRCDIR)/webapp/dist $(ROOT_SRCDIR)/webapp/node_modules webapp: webapp/install - (cd webapp && gulp build) - -webapp/debug: - (cd webapp && gulp watch &) + mkdir -p $(ROOT_SRCDIR)/webapp/dist $(ROOT_SRCDIR)/webapp/dist/fonts + (cd $(ROOT_SRCDIR)/webapp && cp -a ./assets ./src/index.html ./node_modules/font-awesome/css/font-awesome.min.css ./dist/) + (cd $(ROOT_SRCDIR)/webapp && cp -a ./node_modules/font-awesome/fonts/* ./dist/fonts/) webapp/install: (cd webapp && npm install) - @if [ -d ${DESTDIR}/usr/local/etc ]; then rm -rf ${DESTDIR}/usr; fi .PHONY: scripts scripts: |