mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
makefile deploy now seems to work ok..
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2ecc8dbc21
commit
947afd3f38
@ -265,69 +265,79 @@ css: $(CSS_FILES)
|
|||||||
dev: $(NODE_DIR) css
|
dev: $(NODE_DIR) css
|
||||||
|
|
||||||
|
|
||||||
|
# General targets...
|
||||||
|
#
|
||||||
|
.PHONY: run
|
||||||
|
run: electron-run
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: dist
|
||||||
|
dist: electron-test-dist
|
||||||
|
#dist: electron-dist
|
||||||
|
|
||||||
|
|
||||||
|
# NOTE: with the default sort order this gets the "latest" file, not sure
|
||||||
|
# how portable this is...
|
||||||
|
# XXX HACK-ish...
|
||||||
|
# - deploy only when scrip both the script AND target are available
|
||||||
|
# XXX should we build what we need to deploy???
|
||||||
|
.PHONY: deploy
|
||||||
|
deploy: $(wildcard $(DIST_DIR)/$(APP_NAME)-*.zip) $(wildcard scripts/deploy.sh)
|
||||||
|
@[ -e ./scripts/deploy.sh ] \
|
||||||
|
&& for f in $(DIST_DIR)/$(APP_NAME)-*.zip ; do \
|
||||||
|
[ -e "$${f}" ] \
|
||||||
|
&& bash ./scripts/deploy.sh "$${f}" \
|
||||||
|
|| echo "Nothing to deploy." ; \
|
||||||
|
done \
|
||||||
|
|| echo Deploy script not found: scripts/deploy.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(BUILD_DIR)
|
$(RM) $(BUILD_DIR)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: cleanall
|
.PHONY: clean-all
|
||||||
cleanall: clean
|
clean-all: clean
|
||||||
$(RM) $(DIST_DIR) $(TARGET_DIR) $(NODE_DIR)
|
$(RM) $(DIST_DIR) $(TARGET_DIR) $(NODE_DIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------- Electron targets ---
|
||||||
|
|
||||||
.PHONY: electron-dist
|
.PHONY: electron-dist
|
||||||
electron-dist: VERSION := $(VERSION)-el
|
electron-dist: VERSION := $(VERSION)-el
|
||||||
electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||||
electron-dist: $(DIST)
|
electron-dist: $(DIST)
|
||||||
|
|
||||||
# add a time stamp to version...
|
# add a time stamp to version...
|
||||||
.PHONY: test-electron-dist
|
.PHONY: electron-test-dist
|
||||||
test-electron-dist: VERSION := $(VERSION)-$(DATE)-el
|
electron-test-dist: VERSION := $(VERSION)-$(DATE)-el
|
||||||
test-electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
electron-test-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||||
test-electron-dist: $$(DIST)
|
electron-test-dist: $$(DIST)
|
||||||
#test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
#electron-test-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: VERSION := $(VERSION)-el
|
electron-unpacked: VERSION := $(VERSION)-el
|
||||||
electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/
|
electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/
|
||||||
|
|
||||||
|
|
||||||
#.PHONY: electron-inst
|
#.PHONY: electron-inst
|
||||||
#electron-inst: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).msi
|
#electron-inst: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).msi
|
||||||
|
|
||||||
|
|
||||||
.PHONY: electron-run
|
.PHONY: electron-run
|
||||||
electron-run: dev
|
electron-run: dev
|
||||||
electron .
|
electron .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------- Web/browser targets ---
|
||||||
|
|
||||||
.PHONY: web
|
.PHONY: web
|
||||||
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
||||||
|
|
||||||
|
|
||||||
.PHONY: run
|
|
||||||
run: electron-run
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: dist
|
|
||||||
dist: test-electron-dist
|
|
||||||
#dist: electron-dist
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE: with the default sort order this gets the "latest" file, not sure
|
|
||||||
# how portable this is...
|
|
||||||
# XXX when ./dist is empty or non existent this will deploy the second arg...
|
|
||||||
# XXX HACK-ish...
|
|
||||||
# - deploy only when scrip both the script AND target are available
|
|
||||||
.PHONY: deploy
|
|
||||||
deploy: $(wildcard $(DIST_DIR)/$(APP_NAME)-*.zip) $(wildcard scripts/deploy.sh)
|
|
||||||
@[ -e ./scripts/deploy.sh ] \
|
|
||||||
&& [ -e $(DIST_DIR)/$(APP_NAME)-*.zip ] \
|
|
||||||
&& bash ./scripts/deploy.sh "$(DIST_DIR)/$(APP_NAME)-*.zip" \
|
|
||||||
|| echo "Deploy error: `[ -e ./scripts/deploy.sh ] && echo Distribution || echo Deploy script` not found."
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#**********************************************************************
|
#**********************************************************************
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user