#!/bin/sh
# Copyright 2026 Petri Koistinen. Licensed under the Apache License, Version 2.0.
set -eu

REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT"

# The workspace version is the UTC day the tree was last committed on.
# When the day has changed since the stamp, the commit carries a fresh
# stamp, so no build published from main names an earlier day.
stamped=$(./script/version-stamp.sh)
if [ -n "$stamped" ]; then
    echo "$stamped"
    git add Cargo.toml Cargo.lock
fi

exec "$REPO_ROOT/script/verify-commit.sh"
