diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-06-08 21:17:38 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-06-08 21:18:18 +0200 |
commit | 82d7ddb1b34e36fa399fd333efc716add8bf341a (patch) | |
tree | 10c49275abaab20391f0f646609462981d2f1ad0 | |
parent | 3af1486d488be0ce450b0f92fed3d45221bdac9f (diff) | |
download | vyos-build-82d7ddb1b34e36fa399fd333efc716add8bf341a.tar.gz vyos-build-82d7ddb1b34e36fa399fd333efc716add8bf341a.zip |
Move the version.json file used by newer code to /usr/share/vyos
-rwxr-xr-x | scripts/make-version-file | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/make-version-file b/scripts/make-version-file index bdf489d7..95574722 100755 --- a/scripts/make-version-file +++ b/scripts/make-version-file @@ -56,7 +56,7 @@ if build_config['build_type'] == 'development': git_branch = repo.active_branch.name branch_version = version_mapping[git_branch] - version = "{0}-rolling-{1}".format(branch_version, build_timestamp) + version = "{0}-rolling+{1}".format(branch_version, build_timestamp) except Exception as e: print("Could not build a version string specific to git branch, falling back to default: {0}".format(str(e))) version = "999.{0}".format(build_timestamp) @@ -71,7 +71,9 @@ version_data = { 'build_id': build_id } -with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/version.json'), 'w') as f: + +os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos'), exist_ok=True) +with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos/version.json'), 'w') as f: json.dump(version_data, f) # For backwards compatibility with 'add system image' script from older versions |