21 lines
632 B
Bash
Executable File
21 lines
632 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
tmp="$(mktemp -d)"
|
|
trap 'rm -rf "$tmp"' EXIT
|
|
|
|
cd "$repo_root"
|
|
FRAG_REPO='sow-tools' \
|
|
FRAG_SHA='abc123' \
|
|
FRAG_ARTIFACT='registry.example/sow/sow-tools:"quoted"' \
|
|
FRAG_URL=$'https://example.invalid/releases\nnext' \
|
|
FRAG_RUN_ID='run-1' \
|
|
FRAG_OUT="$tmp/fragment.json" \
|
|
./scripts/emit-release-fragment.sh
|
|
|
|
jq -e '.repo == "sow-tools" and .artifact == "registry.example/sow/sow-tools:\"quoted\"" and (.publish_url | contains("next"))' \
|
|
"$tmp/fragment.json" >/dev/null
|
|
|
|
echo "release-fragment-contract: JSON escapes env values"
|