diff options
-rw-r--r-- | Makefile.gbuild | 12 | ||||
-rwxr-xr-x | bin/update/create_build_config.py | 21 |
2 files changed, 33 insertions, 0 deletions
diff --git a/Makefile.gbuild b/Makefile.gbuild index bcfa569954eb..be6788b59a83 100644 --- a/Makefile.gbuild +++ b/Makefile.gbuild @@ -23,4 +23,16 @@ $(eval $(call gb_Module_make_global_targets,$(SRCDIR)/RepositoryModule_$(gb_Side upload-symbols: bin/upload_symbols.py $(WORKDIR)/symbols.zip $(BREAKPAD_SYMBOL_CONFIG) "$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)" +create-update-info: + rm -rf $(WORKDIR)/mar || true + rm -rf $(WORKDIR)/update-info || true + mkdir -p $(WORKDIR)/update-info + $(eval BUILDID := $(shell git -C $(SRCDIR) log -1 --format=%H)) + $(eval VERSION := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)) + $(SRCDIR)/bin/update/create_build_config.py "$(PRODUCTNAME)" "$(VERSION)" "$(BUILDID)" "$(UPDATE_CHANNEL)" "$(WORKDIR)/update-info" + mkdir -p $(WORKDIR)/mar/current-build + tar zxvf $(WORKDIR)/installation/$(PRODUCTNAME)/archive/install/en-US/*tar.gz -C $(WORKDIR)/mar/current-build/ + strip -g $(WORKDIR)/mar/current-build/*/program/* || true + MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/make_full_update.sh $(WORKDIR)/update-info/$(PRODUCTNAME)_$(VERSION)_$(RTL_OS)_$(RTL_ARCH)_$(BUILDID)_complete.mar $(WORKDIR)/mar/current-build/*/ + # vim: set noet sw=4 ts=4: diff --git a/bin/update/create_build_config.py b/bin/update/create_build_config.py new file mode 100755 index 000000000000..964c92256fb7 --- /dev/null +++ b/bin/update/create_build_config.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python3 + +import json +import sys +import os + +def main(argv): + if len(argv) < 6: + print("Usage: create_build_config.py $PRODUCTNAME $VERSION $BUILDID $UPDATECHANNEL $TARGETDIR") + + data = { 'productName' : argv[1], + 'version' : argv[2], + 'buildNumber' : argv[3], + 'updateChannel' : argv[4] + } + + with open(os.path.join(argv[5], "build_config.json"), "w") as f: + json.dump(data, f, indent=4) + +if __name__ == "__main__": + main(sys.argv) |