mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
cleanup and minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1ef859573e
commit
25f895aaf0
@ -151,9 +151,10 @@ APP_NAME ?= ImageGrid.Viewer
|
|||||||
VERSION_FALLBACK ?= 4.0.0a
|
VERSION_FALLBACK ?= 4.0.0a
|
||||||
# NOTE: we are not using './ig --version 2> /dev/null' because it will
|
# NOTE: we are not using './ig --version 2> /dev/null' because it will
|
||||||
# not work before we do 'npm install'...
|
# not work before we do 'npm install'...
|
||||||
VERSION := $(strip $(shell \
|
APP_VERSION := $(strip $(shell \
|
||||||
echo 'console.log(require("./package.json").version)' | node - \
|
echo 'console.log(require("./package.json").version)' | node - \
|
||||||
|| echo $(VERSION_FALLBACK)))
|
|| echo $(VERSION_FALLBACK)))
|
||||||
|
VERSION := $(APP_VERSION)
|
||||||
DATE := $(strip $(shell date "+%Y%m%d%H%M"))
|
DATE := $(strip $(shell date "+%Y%m%d%H%M"))
|
||||||
COMMIT := $(strip $(shell git rev-parse HEAD))
|
COMMIT := $(strip $(shell git rev-parse HEAD))
|
||||||
|
|
||||||
@ -376,7 +377,7 @@ doc/MAKE: Makefile
|
|||||||
.PHONY: version
|
.PHONY: version
|
||||||
version: ## Print version and exit
|
version: ## Print version and exit
|
||||||
version:
|
version:
|
||||||
@echo $(VERSION)
|
@echo $(APP_VERSION)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -509,6 +510,7 @@ web: ## Build a browser-runnable package
|
|||||||
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##-------------------------------------------------------- Electron ---
|
##-------------------------------------------------------- Electron ---
|
||||||
|
|
||||||
# XXX this can potentially do a build for an existing/matching *.zip in
|
# XXX this can potentially do a build for an existing/matching *.zip in
|
||||||
@ -624,7 +626,7 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
|
|||||||
|
|
||||||
version.js: package.json
|
version.js: package.json
|
||||||
cat version.js.tpl \
|
cat version.js.tpl \
|
||||||
| sed 's/\$$VERSION/$(VERSION)/' \
|
| sed 's/\$$VERSION/$(APP_VERSION)/' \
|
||||||
> version.js
|
> version.js
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
/**********************************************************************
|
|
||||||
*
|
|
||||||
* NOTE: version.js is generated automatically by Makefile from a template
|
|
||||||
* do not edit directly.
|
|
||||||
* Edit version.js.tpl instead.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**********************************************************************/
|
|
||||||
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
|
|
||||||
(function(require){ var module={} // make module AMD/node compatible...
|
|
||||||
/*********************************************************************/
|
|
||||||
|
|
||||||
// The version lives in package.json
|
|
||||||
//
|
|
||||||
// We need to be able to read the correct version in the folowing
|
|
||||||
// contexts:
|
|
||||||
// - nodejs/electron - can load JSON directly
|
|
||||||
// - browser (remote) - can load json via the require('json!package.json')
|
|
||||||
// - browser (local) - can't get access to .json files
|
|
||||||
// Thus the only way around this is to generate this file from a template.
|
|
||||||
|
|
||||||
module.version = '4.0.1a-202201282135-el'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* vim:set ts=4 sw=4 : */ return module })
|
|
||||||
Loading…
x
Reference in New Issue
Block a user