#!/usr/bin/env bash # Husky pre-push hook body. Compiles the solution, runs the test suite and builds the # web client, so broken code never leaves the workstation. set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh cd "$CI_ROOT" ensure_dotnet ensure_node log "Building the solution (Debug)" dotnet build Novelly.slnx -c Debug log "Running Novelly.Api.Tests" dotnet test tests/Novelly.Api.Tests/Novelly.Api.Tests.csproj -c Debug log "Installing web dependencies (npm ci)" npm --prefix src/Novelly.Web ci log "Building the web client (vite build)" npm --prefix src/Novelly.Web run build log "prepush.sh complete - ok to push"