#!/bin/bash # Calculate hash for go.mod + go.sum to use as Docker tag # Usage: scripts/ci-calculate-deps-hash.sh set -e # Calculate SHA256 hash of go.mod and go.sum combined DEPS_HASH=$(sha256sum go.mod go.sum | sha256sum | cut -d' ' -f1 | head -c 12) echo "Dependency hash: $DEPS_HASH" echo "$DEPS_HASH" > .deps_hash echo "::set-output name=deps_hash::$DEPS_HASH"