runtime-code-shasum.sh 624 B

12345678910111213141516171819202122
  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. TAR=tar
  7. if [[ "$OSTYPE" == "darwin"* ]]; then
  8. TAR=gtar
  9. fi
  10. # sort/owner/group/mtime arguments only work with gnu version of tar!
  11. ${TAR} -c --sort=name --owner=root:0 --group=root:0 --mode 644 --mtime='UTC 2020-01-01' \
  12. Cargo.lock \
  13. Cargo.toml \
  14. runtime \
  15. runtime-modules \
  16. utils/chain-spec-builder \
  17. joystream-node.Dockerfile | shasum | cut -d " " -f 1