CD/CD consolidation

This commit is contained in:
StellaOps Bot
2025-12-26 17:32:23 +02:00
parent a866eb6277
commit c786faae84
638 changed files with 3821 additions and 181 deletions

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
# Deterministic hashing helper for DevPortal SDK snippet packs and offline bundle artefacts.
# Usage:
# SNIPPET_DIR=src/DevPortal/StellaOps.DevPortal.Site/snippets \
# OUT_SHA=src/DevPortal/StellaOps.DevPortal.Site/SHA256SUMS.devportal-stubs \
# tools/devportal/hash-snippets.sh
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
SNIPPET_DIR="${SNIPPET_DIR:-$ROOT/src/DevPortal/StellaOps.DevPortal.Site/snippets}"
OUT_SHA="${OUT_SHA:-$ROOT/src/DevPortal/StellaOps.DevPortal.Site/SHA256SUMS.devportal-stubs}"
if [[ ! -d "$SNIPPET_DIR" ]]; then
echo "Snippet dir not found: $SNIPPET_DIR" >&2
exit 1
fi
mkdir -p "$(dirname "$OUT_SHA")"
: > "$OUT_SHA"
cd "$SNIPPET_DIR"
find . -type f -print0 | sort -z | while IFS= read -r -d '' f; do
sha=$(sha256sum "$f" | cut -d' ' -f1)
printf "%s %s\n" "$sha" "${SNIPPET_DIR#$ROOT/}/$f" >> "$OUT_SHA"
echo "hashed $f"
done
echo "Hashes written to $OUT_SHA"