Én zip en mottakende organisasjon deployer uten å klone repoet eller ha konto her. Arkivet er git archive HEAD (tracked files only), som er SAMME tre den målte docker-build-konteksten bruker — og grunnen til at STATE.md/*.local.md/.env ikke kan komme inn: de er gitignorert, ikke filtrert bort av et filter vi må vedlikeholde. DEPLOY.md svarer mottakerens tre første spørsmål: hvem gjør hva (plattform-operatør, bestiller, fagperson), prosessen ende-til-ende, og hvorfor det ikke finnes et chat-grensesnitt. Den navngir også deploy-kravet 4e målte men aldri skrev ned: pakket model_map.json bærer REPLACE-WITH-*, så uten PORTFOLIO_MODEL_MAP starter containeren, svarer på /readiness og feiler hver invocation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SeW1LhH5TtXxKZPe9JkqL1
33 lines
1.4 KiB
Bash
Executable file
33 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Build the external handover package (Fase 5): one archive a receiver deploys into their own
|
|
# Microsoft Foundry, without cloning this repository or having an account on our Forgejo.
|
|
#
|
|
# The archive is git's view of HEAD -- TRACKED FILES ONLY. That is deliberate and it is the whole
|
|
# exposure control: STATE.md is gitignored, *.local.md is gitignored, .env is gitignored, so they
|
|
# cannot enter the archive. A filter maintained here would be a second copy of that rule, and the
|
|
# second copy is the one that drifts (kø-(p)).
|
|
#
|
|
# It is also the SAME tree the measured docker build context uses (see the Dockerfile header:
|
|
# `git archive HEAD | docker build --platform linux/amd64 -`), so what the receiver deploys is what
|
|
# we measured -- never a hand-curated selection.
|
|
#
|
|
# Usage: scripts/make-handover-package.sh [dest-dir] (default: dist/)
|
|
# Gated by tests/test_handover_package_loadbearing.py.
|
|
set -euo pipefail
|
|
|
|
DEST="${1:-dist}"
|
|
mkdir -p "$DEST"
|
|
|
|
# Version from pyproject.toml -- the one place the build stamps it. Read, never hardcoded: a second
|
|
# copy here would go stale at the next bump exactly like the README wheel filename did (Fase 3).
|
|
VERSION=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)
|
|
if [ -z "$VERSION" ]; then
|
|
echo "make-handover-package: could not read version from pyproject.toml" >&2
|
|
exit 1
|
|
fi
|
|
|
|
OUT="$DEST/portfolio-optimiser-foundry-$VERSION.zip"
|
|
|
|
git archive --format=zip --output "$OUT" HEAD
|
|
|
|
echo "$OUT"
|