Skip to content
Snippets Groups Projects
Commit c4109b34 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Add DATE and PRIORITY fields to the manifest

parent d376f4d4
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,8 @@ toolchain/% package/% target/%: FORCE ...@@ -90,7 +90,8 @@ toolchain/% package/% target/%: FORCE
+@$(GLUONMAKE) $@ +@$(GLUONMAKE) $@
manifest: FORCE manifest: FORCE
[ -n "$(GLUON_BRANCH)" ] || (echo 'Please set GLUON_BRANCH to create a manifest.'; false) [ -n '$(GLUON_BRANCH)' ] || (echo 'Please set GLUON_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) @$(CheckExternal)
+@$(GLUONMAKE_EARLY) maybe-prepare-target +@$(GLUONMAKE_EARLY) maybe-prepare-target
+@$(GLUONMAKE) $@ +@$(GLUONMAKE) $@
...@@ -342,17 +343,23 @@ images: $(patsubst %,call_image/%,$(PROFILES)) ; ...@@ -342,17 +343,23 @@ images: $(patsubst %,call_image/%,$(PROFILES)) ;
manifest: FORCE manifest: FORCE
mkdir -p $(GLUON_IMAGEDIR)/sysupgrade mkdir -p $(GLUON_IMAGEDIR)/sysupgrade
(cd $(GLUON_IMAGEDIR)/sysupgrade && echo 'BRANCH=$(GLUON_BRANCH)' && echo && ($(foreach profile,$(PROFILES), \ (cd $(GLUON_IMAGEDIR)/sysupgrade && \
$(foreach model,$(GLUON_$(profile)_MODELS), \ echo 'BRANCH=$(GLUON_BRANCH)' && \
for file in gluon-*-'$(GLUON_$(profile)_MODEL_$(model))-sysupgrade.bin'; do \ echo 'DATE=$(shell $(STAGING_DIR_HOST)/bin/lua $(GLUONDIR)/scripts/rfc3339date.lua)' && \
[ -e "$$file" ] && echo \ echo 'PRIORITY=$(GLUON_PRIORITY)' && \
'$(GLUON_$(profile)_MODEL_$(model))' \ echo && \
"$$(echo "$$file" | sed -n -r -e 's/^gluon-$(call regex-escape,$(GLUON_SITE_CODE))-(.*)-$(call regex-escape,$(GLUON_$(profile)_MODEL_$(model)))-sysupgrade\.bin$$/\1/p')" \ ($(foreach profile,$(PROFILES), \
"$$($(SHA512SUM) "$$file")" \ $(foreach model,$(GLUON_$(profile)_MODELS), \
"$$file" && break; \ for file in gluon-*-'$(GLUON_$(profile)_MODEL_$(model))-sysupgrade.bin'; do \
done; \ [ -e "$$file" ] && echo \
) \ '$(GLUON_$(profile)_MODEL_$(model))' \
) :)) > $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest "$$(echo "$$file" | sed -n -r -e 's/^gluon-$(call regex-escape,$(GLUON_SITE_CODE))-(.*)-$(call regex-escape,$(GLUON_$(profile)_MODEL_$(model)))-sysupgrade\.bin$$/\1/p')" \
"$$($(SHA512SUM) "$$file")" \
"$$file" && break; \
done; \
) \
) :) \
) > $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest
.PHONY: all images prepare clean gluon-tools .PHONY: all images prepare clean gluon-tools
......
local time = os.time()
local timestamp = os.date('%F %T', time)
local timezone = os.date('%z', time):gsub('^([+-]%d%d)(%d%d)$', '%1:%2')
print(timestamp .. timezone)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment