From e6d3d1584cb044b974d0f19b3935eabbb666caad Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 4 Jul 2020 12:26:59 +0200 Subject: [PATCH] build: deprecate GLUON_BRANCH Make variable GLUON_AUTOUPDATER_BRANCH and GLUON_AUTOUPDATER_ENABLED should be set separately now. --- Makefile | 18 +++++++++++++----- targets/generic | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e121d3c8..dabb0ea0 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,14 @@ GLUON_RELEASE ?= $(error GLUON_RELEASE not set. GLUON_RELEASE can be set in site GLUON_DEPRECATED ?= $(error GLUON_DEPRECATED not set. Please consult the documentation) +ifneq ($(GLUON_BRANCH),) + $(warning *** Warning: GLUON_BRANCH has been deprecated, please set GLUON_AUTOUPDATER_BRANCH and GLUON_AUTOUPDATER_ENABLED instead.) + GLUON_AUTOUPDATER_BRANCH ?= $(GLUON_BRANCH) + GLUON_AUTOUPDATER_ENABLED ?= 1 +endif + +GLUON_AUTOUPDATER_ENABLED ?= 0 + # initialize (possibly already user set) directory variables GLUON_TMPDIR ?= tmp GLUON_OUTPUTDIR ?= output @@ -58,7 +66,7 @@ endef GLUON_VARS = \ GLUON_RELEASE GLUON_REGION GLUON_MULTIDOMAIN GLUON_AUTOREMOVE GLUON_DEBUG GLUON_MINIFY GLUON_DEPRECATED \ GLUON_DEVICES GLUON_TARGETSDIR GLUON_PATCHESDIR GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR GLUON_DEBUGDIR \ - GLUON_SITEDIR GLUON_RELEASE GLUON_BRANCH GLUON_LANGS GLUON_BASE_FEEDS \ + GLUON_SITEDIR GLUON_RELEASE GLUON_AUTOUPDATER_BRANCH GLUON_AUTOUPDATER_ENABLED GLUON_LANGS GLUON_BASE_FEEDS \ GLUON_TARGET BOARD SUBTARGET unexport $(GLUON_VARS) @@ -185,23 +193,23 @@ dirclean: FORCE manifest: $(LUA) FORCE @ - [ '$(GLUON_BRANCH)' ] || (echo 'Please set GLUON_BRANCH to create a manifest.'; false) + [ '$(GLUON_AUTOUPDATER_BRANCH)' ] || (echo 'Please set GLUON_AUTOUPDATER_BRANCH to create a manifest.'; false) echo '$(GLUON_PRIORITY)' | grep -qE '^([0-9]*\.)?[0-9]+$$' || (echo 'Please specify a numeric value for GLUON_PRIORITY to create a manifest.'; false) $(CheckExternal) ( export $(GLUON_ENV) - echo 'BRANCH=$(GLUON_BRANCH)' + echo 'BRANCH=$(GLUON_AUTOUPDATER_BRANCH)' echo "DATE=$$($(LUA) scripts/rfc3339date.lua)" echo 'PRIORITY=$(GLUON_PRIORITY)' echo for target in $(GLUON_TARGETS); do $(LUA) scripts/generate_manifest.lua "$$target" done - ) > 'tmp/$(GLUON_BRANCH).manifest.tmp' + ) > 'tmp/$(GLUON_AUTOUPDATER_BRANCH).manifest.tmp' mkdir -p '$(GLUON_IMAGEDIR)/sysupgrade' - mv 'tmp/$(GLUON_BRANCH).manifest.tmp' '$(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest' + mv 'tmp/$(GLUON_AUTOUPDATER_BRANCH).manifest.tmp' '$(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_AUTOUPDATER_BRANCH).manifest' FORCE: ; diff --git a/targets/generic b/targets/generic index e9328922..8b1d484f 100644 --- a/targets/generic +++ b/targets/generic @@ -4,8 +4,8 @@ assert(env.GLUON_LANGS) config('GLUON_SITEDIR', env.GLUON_SITEDIR) config('GLUON_RELEASE', env.GLUON_RELEASE) -try_config('GLUON_AUTOUPDATER_BRANCH', env.GLUON_BRANCH) -try_config('GLUON_AUTOUPDATER_ENABLED', env.GLUON_BRANCH ~= '') +try_config('GLUON_AUTOUPDATER_BRANCH', env.GLUON_AUTOUPDATER_BRANCH) +try_config('GLUON_AUTOUPDATER_ENABLED', istrue(env.GLUON_AUTOUPDATER_ENABLED)) for lang in string.gmatch(env.GLUON_LANGS, '%S+') do try_config('GLUON_WEB_LANG_' .. lang, true)