From 09b56c1f67dd2911b9103ee1ef2c9814b7470c4c Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 29 Apr 2016 10:32:06 -0700 Subject: [PATCH] Write icon config as json instead of shell. --- server/build_image.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/build_image.py b/server/build_image.py index a79db6c..c954f72 100755 --- a/server/build_image.py +++ b/server/build_image.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import argparse +import json import os import shutil import subprocess @@ -217,8 +218,10 @@ class ImageBuilder(object): *self._BASE_PACKAGES) def _WriteVersion(self, chroot_path, timestamp): - with open(os.path.join(chroot_path, 'etc', 'iconograph'), 'w') as fh: - fh.write('TIMESTAMP=%d\n' % timestamp) + with open(os.path.join(chroot_path, 'etc', 'iconograph.json'), 'w') as fh: + json.dump({ + 'timestamp': timestamp, + }, fh) def _RunModules(self, chroot_path): for module in self._modules: