about summary refs log tree commit diff
path: root/tools/nixery
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-02T00·02+0100
committerVincent Ambo <github@tazj.in>2019-08-02T00·08+0100
commitbf34bb327ccdd4a8f1ff5dd10a9197e5114b7379 (patch)
tree71ccc1050f53071a218edf0739a465058528a007 /tools/nixery
parent3d0596596ac03957db6646836e6b4ec0d222e23a (diff)
fix(nix): Calculate MD5 sum of config layer correctly
The MD5 sum is used for verifying contents in the layer cache before
accidentally re-uploading, but the syntax of the hash invocation was
incorrect leading to a cache-bust on the manifest layer on every
single build (even for identical images).
Diffstat (limited to 'tools/nixery')
-rw-r--r--tools/nixery/build-registry-image.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/nixery/build-registry-image.nix b/tools/nixery/build-registry-image.nix
index d06c9f3bfae3..20eb6d9e98d4 100644
--- a/tools/nixery/build-registry-image.nix
+++ b/tools/nixery/build-registry-image.nix
@@ -208,7 +208,7 @@ let
   } ''
     size=$(wc -c ${configJson} | cut -d ' ' -f1)
     sha256=$(sha256sum ${configJson} | cut -d ' ' -f1)
-    md5=$(openssl dgst -md5 -binary $layerPath | openssl enc -base64)
+    md5=$(openssl dgst -md5 -binary ${configJson} | openssl enc -base64)
     jq -n -c --arg size $size --arg sha256 $sha256 --arg md5 $md5 \
       '{ size: ($size | tonumber), sha256: $sha256, md5: $md5 }' \
       >> $out