To isolate local artifacts from downloaded one we create a local equivalent of
~/.m2/repositories.
mkdir -p ~/.m2/local| diff \ | |
| <(sops -d <(git --no-pager show origin/master:foobar.sops)) \ | |
| <(sops -d <(git --no-pager show origin/mybranch:foobar.sops)) |
| // Computes the SHA-256 digest of a string with Web Crypto | |
| // Source: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest | |
| function sha256(str) { | |
| // Get the string as arraybuffer. | |
| var buffer = new TextEncoder("utf-8").encode(str) | |
| return crypto.subtle.digest("SHA-256", buffer).then(function(hash) { | |
| return hex(hash) | |
| }) | |
| } |