Align website tooling with govoplan-website rename
This commit is contained in:
@@ -7,8 +7,8 @@ Usage:
|
||||
tools/release/publish-release-catalog.sh --version <x.y.z> --catalog-signing-key <key-id=/path/private.pem> [options]
|
||||
|
||||
Generates a signed module package catalog for a GovOPlaN release, writes it into
|
||||
addideas-govoplan-website/public/catalogs/v1, validates it, optionally builds the website,
|
||||
and optionally commits/tags/pushes addideas-govoplan-website.
|
||||
govoplan-website/public/catalogs/v1, validates it, optionally builds the website,
|
||||
and optionally commits/tags/pushes govoplan-website.
|
||||
|
||||
Options:
|
||||
--version <x.y.z> Release version without leading v.
|
||||
@@ -19,15 +19,15 @@ Options:
|
||||
--catalog-signing-key <key-id=/path/private.pem>
|
||||
Ed25519 private key. May be repeated for rotation.
|
||||
--core-root <path> govoplan-core checkout. Defaults to ../govoplan-core.
|
||||
--web-root <path> addideas-govoplan-website checkout. Defaults to ../addideas-govoplan-website.
|
||||
--web-root <path> govoplan-website checkout. Defaults to ../govoplan-website.
|
||||
--public-base-url <url> Public website URL. Defaults to https://govoplan.add-ideas.de.
|
||||
--npm <path> npm executable used for optional web build.
|
||||
--build-web Run npm run build in addideas-govoplan-website after generating files.
|
||||
--commit Commit generated catalog files in addideas-govoplan-website.
|
||||
--tag Tag addideas-govoplan-website with catalog-v<x.y.z>. Implies --commit.
|
||||
--push Push addideas-govoplan-website branch and tag. Implies --commit.
|
||||
--build-web Run npm run build in govoplan-website after generating files.
|
||||
--commit Commit generated catalog files in govoplan-website.
|
||||
--tag Tag govoplan-website with catalog-v<x.y.z>. Implies --commit.
|
||||
--push Push govoplan-website branch and tag. Implies --commit.
|
||||
--remote <name> Git remote for push. Defaults to origin.
|
||||
--branch <name> Branch to push. Defaults to current addideas-govoplan-website branch.
|
||||
--branch <name> Branch to push. Defaults to current govoplan-website branch.
|
||||
-n, --dry-run Print commands and validate inputs without writing git changes.
|
||||
-h, --help Show this help.
|
||||
USAGE
|
||||
@@ -42,7 +42,7 @@ META_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
PARENT="$(dirname "$META_ROOT")"
|
||||
CORE_ROOT="${GOVOPLAN_CORE_ROOT:-$PARENT/govoplan-core}"
|
||||
CORE_ROOT="$(cd "$CORE_ROOT" && pwd)"
|
||||
WEB_ROOT="$PARENT/addideas-govoplan-website"
|
||||
WEB_ROOT="$PARENT/govoplan-website"
|
||||
VERSION=""
|
||||
CHANNEL="stable"
|
||||
SEQUENCE=""
|
||||
@@ -176,14 +176,14 @@ done
|
||||
[[ "$PROFILE" == "base" || "$PROFILE" == "full" ]] || fail "profile must be base or full: $PROFILE"
|
||||
[[ ${#SIGNING_KEYS[@]} -gt 0 ]] || fail "at least one --catalog-signing-key is required"
|
||||
[[ -d "$CORE_ROOT/.git" ]] || fail "not a govoplan-core git repo: $CORE_ROOT"
|
||||
[[ -d "$WEB_ROOT/.git" ]] || fail "not an addideas-govoplan-website git repo: $WEB_ROOT"
|
||||
[[ -d "$WEB_ROOT/.git" ]] || fail "not an govoplan-website git repo: $WEB_ROOT"
|
||||
command -v "$PYTHON" >/dev/null 2>&1 || fail "Python not found: $PYTHON"
|
||||
command -v "$NPM_BIN" >/dev/null 2>&1 || fail "npm not found: $NPM_BIN"
|
||||
|
||||
if [[ -z "$BRANCH" ]]; then
|
||||
BRANCH="$(git -C "$WEB_ROOT" symbolic-ref --quiet --short HEAD || true)"
|
||||
fi
|
||||
[[ -n "$BRANCH" ]] || fail "cannot infer addideas-govoplan-website branch; pass --branch"
|
||||
[[ -n "$BRANCH" ]] || fail "cannot infer govoplan-website branch; pass --branch"
|
||||
|
||||
CATALOG_PATH="$WEB_ROOT/public/catalogs/v1/channels/$CHANNEL.json"
|
||||
KEYRING_PATH="$WEB_ROOT/public/catalogs/v1/keyring.json"
|
||||
@@ -257,7 +257,7 @@ if [[ "$COMMIT" -eq 1 ]]; then
|
||||
run git -C "$WEB_ROOT" add -A "$CATALOG_PATH" "$KEYRING_PATH" "$MODULE_DIRECTORY_PATH"
|
||||
if [[ "$DRY_RUN" -eq 0 ]]; then
|
||||
if git -C "$WEB_ROOT" diff --cached --quiet; then
|
||||
echo "No addideas-govoplan-website catalog changes to commit."
|
||||
echo "No govoplan-website catalog changes to commit."
|
||||
else
|
||||
run git -C "$WEB_ROOT" commit -m "Publish GovOPlaN v$VERSION $CHANNEL catalog"
|
||||
fi
|
||||
@@ -268,7 +268,7 @@ fi
|
||||
|
||||
if [[ "$TAG_WEB" -eq 1 ]]; then
|
||||
if git -C "$WEB_ROOT" rev-parse --quiet --verify "refs/tags/$TAG_NAME" >/dev/null; then
|
||||
fail "addideas-govoplan-website tag already exists: $TAG_NAME"
|
||||
fail "govoplan-website tag already exists: $TAG_NAME"
|
||||
fi
|
||||
run git -C "$WEB_ROOT" tag -a "$TAG_NAME" -m "Publish GovOPlaN v$VERSION $CHANNEL catalog"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user