build: deprecate GLUON_BRANCH Make variable

GLUON_AUTOUPDATER_BRANCH and GLUON_AUTOUPDATER_ENABLED should be set
separately now.
This commit is contained in:
Matthias Schiffer 2020-07-04 12:26:59 +02:00
parent d82ffb4f81
commit e6d3d1584c
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 15 additions and 7 deletions

View File

@ -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: ;

View File

@ -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)