From 1bff19a2c0de2825bec287ffd64bee6bace3f448 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 28 Aug 2016 16:04:35 +0200 Subject: add makefile part to generate mar file and update info We still need some parts for the partial update files but we already generate the build information and the complete mar file. Change-Id: I2ae0de0b83518bc3093848b66b6f3054ebd388e1 --- bin/update/create_build_config.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/update/create_build_config.py (limited to 'bin/update') 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) -- cgit