11 lines
544 B
Bash
Executable File
11 lines
544 B
Bash
Executable File
#!/bin/sh
|
|
# Runs in the docker-cli container (Alpine, no Go toolchain — the actual
|
|
# Go build happens inside the Dockerfile's golang:1.22-alpine builder
|
|
# stage, not on the agent itself). Kept simple on purpose: this exists to
|
|
# prove the hooks mechanism runs, not to be a real lint step.
|
|
set -e
|
|
echo "pre_build hook running for ${HOOK_REPO} (phase=${HOOK_PHASE})"
|
|
test -f go.mod || { echo "go.mod missing"; exit 1; }
|
|
test -f Dockerfile || { echo "Dockerfile missing"; exit 1; }
|
|
echo "go.mod and Dockerfile both present — looks buildable."
|