github.com/ethereum-optimism/optimism@v1.7.2/packages/contracts-bedrock/scripts/checks/check-snapshots.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -euo pipefail
     4  
     5  # Generate the snapshots
     6  pnpm snapshots
     7  
     8  # Check if the generated snapshots are different from the committed snapshots
     9  if git diff --exit-code snapshots > /dev/null; then
    10    [ -z "$(git ls-files --others --exclude-standard snapshots)" ] || exit 1
    11  else
    12    exit 1
    13  fi