added timestamp option to dist version...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-01-20 01:14:59 +03:00
parent 9f1fe87509
commit 543ce468e5
3 changed files with 33 additions and 15 deletions

View File

@ -108,8 +108,10 @@
# #
# #
#********************************************************************** #**********************************************************************
.SECONDEXPANSION:
# variables... # variables...
APP_NAME ?= ImageGrid.Viewer APP_NAME ?= ImageGrid.Viewer
@ -119,7 +121,7 @@ VERSION_FALLBACK ?= 4.0.0a
VERSION := $(strip $(shell \ VERSION := $(strip $(shell \
node version.js \ node version.js \
|| echo $(VERSION_FALLBACK))) || echo $(VERSION_FALLBACK)))
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))
@ -276,6 +278,12 @@ cleanall: clean
.PHONY: electron-dist .PHONY: electron-dist
electron-dist: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip electron-dist: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
# add a time stamp to version...
.PHONY: test-electron-dist
test-electron-dist: VERSION := $(VERSION)-$(DATE)
test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip
# NOTE: the "/" at the end here is significant... # NOTE: the "/" at the end here is significant...
.PHONY: electron-unpacked .PHONY: electron-unpacked
electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH)/ electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH)/
@ -285,7 +293,8 @@ electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH)/
.PHONY: dist .PHONY: dist
dist: electron-dist dist: test-electron-dist
#dist: electron-dist
.PHONY: web .PHONY: web
@ -352,8 +361,11 @@ $(NODE_DIR): package.json
# build app dir... # build app dir...
$(BUILD_DIR)/$(APP_NAME)/: $(CSS_FILES) $(PROJECT_FILES) \ $(BUILD_DIR)/$(APP_NAME)/: $(PROJECT_FILES) \
$(JS_FILES) $(CSS_FILES) $(HTML_FILES) \ $(JS_FILES) $(CSS_FILES) $(HTML_FILES) \
$(wildcard $(FEATURES_DIR)/*.js) \
$(wildcard $(LIB_DIR)/*.js) $(wildcard $(LIB_DIR)/widget/*.js) \
$(wildcard $(DOMAIN_DIR)/*.js) \
$(BUILD_INFO) $(BUILD_INFO)
$(MD) "$@" $(MD) "$@"
cp -r $(PROJECT_FILES) $(JS_FILES) $(HTML_FILES) \ cp -r $(PROJECT_FILES) $(JS_FILES) $(HTML_FILES) \
@ -361,6 +373,9 @@ $(BUILD_DIR)/$(APP_NAME)/: $(CSS_FILES) $(PROJECT_FILES) \
$(DOMAIN_DIR) $(WORKERS_DIR) $(CSS_DIR) $(IMAGES_DIR) \ $(DOMAIN_DIR) $(WORKERS_DIR) $(CSS_DIR) $(IMAGES_DIR) \
$(BUILD_INFO) \ $(BUILD_INFO) \
"$(BUILD_DIR)/$(APP_NAME)" "$(BUILD_DIR)/$(APP_NAME)"
# cleanup vim swap files...
cd "$@" ; \
find . -name *.sw[po] -delete
@touch "$@" @touch "$@"
@ -421,6 +436,7 @@ zipdelfrom = cd $1 ; \
$(BUILD_DIR)/app.asar: $(PACK_FULL) $(BUILD_DIR)/app.asar: $(PACK_FULL)
cd $(BUILD_DIR) ; \ cd $(BUILD_DIR) ; \
asar p "$(APP_NAME)" app.asar \ asar p "$(APP_NAME)" app.asar \
--exclude-hidden \
--unpack-dir node_modules/sharp --unpack-dir node_modules/sharp

View File

@ -181,9 +181,8 @@ var PeerActions = actions.Actions({
// XXX need more control... // XXX need more control...
// - get proxies to specific peer... // - get proxies to specific peer...
get peeractions(){ get peeractions(){
this.cache('peeractions', function(){ this.cache('peeractions', function(d){
return this.getPeerActions() }) }, return d instanceof Array ? d.clone() : this.getPeerActions() }) },
//return this.getPeerActions() },
getPeerActions: ['- System/Peer/', getPeerActions: ['- System/Peer/',
function(id){ function(id){

View File

@ -588,17 +588,20 @@ var DialogsActions = actions.Actions({
// introspection... // introspection...
get uiContainers(){ get uiContainers(){
return this.cache('uiContainers', function(){ return this.cache('uiContainers', function(d){
return this.actions.filter(this.isUIContainer.bind(this)) }) }, return d instanceof Array ?
//return this.actions.filter(this.isUIContainer.bind(this)) }, d.slice()
: this.actions.filter(this.isUIContainer.bind(this)) }) },
get uiDialogs(){ get uiDialogs(){
return this.cache('uiDialogs', function(){ return this.cache('uiDialogs', function(d){
return this.actions.filter(this.isUIDialog.bind(this)) }) }, return d instanceof Array ?
//return this.actions.filter(this.isUIDialog.bind(this)) }, d.slice()
: this.actions.filter(this.isUIDialog.bind(this)) }) },
get uiElements(){ get uiElements(){
return this.cache('uiElements', function(){ return this.cache('uiElements', function(d){
return this.actions.filter(this.isUIElement.bind(this)) }) }, return d instanceof Array ?
//return this.actions.filter(this.isUIElement.bind(this)) }, d.slice()
: this.actions.filter(this.isUIElement.bind(this)) }) },
// XXX this knows about action priority and shortcut marker... // XXX this knows about action priority and shortcut marker...
// XXX should these be more like .getDoc(..) and support lists of actions??? // XXX should these be more like .getDoc(..) and support lists of actions???