#!/usr/bin/env sh
# Build the JS assets before committing
initial_state=$(git status --porcelain)

npm run build

current_state=$(git status --porcelain)

if [[ "$initial_state" != "$current_state" ]]; then
  echo "New asset file changes detected after build. Please review and stage the changes before committing."
  exit 1
else
  exit 0
fi
