Commit 1ab5ad61 authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Update upload script to match new networkcache version 0.26

To avoid json-in-json-in-json the metadata is directly put in a file and
the values do not need to be quoted anymore.
The current configuration features only json-in-json.
parent 932f41e0
...@@ -20,15 +20,14 @@ version_to_list () { ...@@ -20,15 +20,14 @@ version_to_list () {
} }
kernel_revision_arch=$(uname -r) kernel_revision_arch=$(uname -r)
# the keys "file" and "urlmd5" are sometimes mandatory in shadir metadata # strings have to be quoted so that the file is decoded as valid json
# and are defined here only for the sake of shadir compliance
json_metadata="{ \ json_metadata="{ \
\"server-group\": \"$SERVER_GROUP\", \ \"server-group\": \"$SERVER_GROUP\", \
\"kernel-version\": \"$(version_to_list $(uname -v | cut -d' ' -f4))\", \ \"kernel-version\": $(version_to_list $(uname -v | cut -d' ' -f4)), \
\"kernel-revision\": \"${kernel_revision_arch%-*}\", \ \"kernel-revision\": \"${kernel_revision_arch%-*}\", \
\"mca-version\": \"$(version_to_list $MCA_VERSION)\", \ \"mca-version\": $(version_to_list $MCA_VERSION), \
\"flb-version\": \"$(version_to_list $FLB_VERSION)\", \ \"flb-version\": $(version_to_list $FLB_VERSION), \
\"plg-version\": \"$(version_to_list $PLG_VERSION)\", \ \"plg-version\": $(version_to_list $PLG_VERSION), \
\"timestamp\": $(date +%s), \ \"timestamp\": $(date +%s), \
\"comment\": \"$hash_comment\" \ \"comment\": \"$hash_comment\" \
}" }"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment