BlueGit

golden-age paperdoll-renderer

Files

paperdoll-renderer / scripts / ci / release.sh

release.sh

release.sh 1.4 KiB Download Raw
1#!/usr/bin/env bash
2# Tag-pipeline publish step.
3#
4# Inspected BlueGit master on 6 November 2026 (api_routes.go, ops_ci.go
5# opPublishRelease, release_replace.go checkReplace, gitrepo.Tag):
6# there is no route that attaches artifacts to an existing git tag or an
7# existing release. POST /api/v1/repos/{owner}/{repo}/releases always creates
8# the annotated tag. An existing tag returns HTTP 409 unless replace=true,
9# and replace=true is HTTP 403 on a tag pipeline.
10#
11# This script therefore does not call that endpoint and does not send
12# replace. It exits 3 until BlueGit grows an attach route. It does not
13# invent a second tag and it does not switch the pipeline onto a branch
14# release. The required server change is recorded in design.md section 15.
15set -euo pipefail
16
17: "${CI_API_URL:?}" "${CI_JOB_TOKEN:?}" "${CI_COMMIT_SHA:?}" "${CI_PROJECT_PATH:?}" "${CI_COMMIT_TAG:?}"
18
19root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
20cd "$root"
21version="$(bash scripts/ci/package-version.sh)"
22
23echo "release-blocked: no-attach-endpoint" >&2
24echo "tag ${CI_COMMIT_TAG} version ${version} commit ${CI_COMMIT_SHA} project ${CI_PROJECT_PATH}" >&2
25echo "BlueGit has no request that publishes these package artifacts onto the tag that already started this pipeline." >&2
26echo "The create-release route would make a new annotated tag. This script does not call it." >&2
27echo "The overwrite flag is not sent. No second tag is created." >&2
28exit 3