runtime-code-shasum.sh 778 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # Compute a hash over files related to building joystream/node docker image
  3. # Cargo workspace root
  4. export WORKSPACE_ROOT=`cargo metadata --offline --no-deps --format-version 1 | jq .workspace_root -r`
  5. cd ${WORKSPACE_ROOT}
  6. # srot/owner/group/mtime arguments only work with gnu version of tar.
  7. # So if you run this on Mac the default version of tar is `bsdtar`
  8. # and you will not get an idempotent result.
  9. # Install gnu-tar with brew
  10. # brew install gnu-tar
  11. # export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
  12. tar -c --sort=name --owner=root:0 --group=root:0 --mtime='UTC 2020-01-01' \
  13. Cargo.lock \
  14. Cargo.toml \
  15. runtime \
  16. runtime-modules \
  17. utils/chain-spec-builder \
  18. joystream-node.Dockerfile | shasum | cut -d " " -f 1