#!/usr/bin/env bash # Build the host-native release bundle and attach it to an existing Gitea # release. Meant for targets CI cannot build. Check out # the tagged commit first, so the crate version matches the tag. # # Required env: GITEA_API, GITEA_TOKEN (contents:write). # Optional env: TAG (defaults to the crate version), JQ. set -euo pipefail here="$(cd "$(dirname "$0")" && pwd)" : "${GITEA_API:?set GITEA_API, e.g., https://git.scient.ing/api/v1/repos//}" : "${GITEA_TOKEN:?set GITEA_TOKEN to a token with contents:write}" version="$(bash "$here/version.sh")" tag="${TAG:-$version}" asset="coursebank-${version}-$(bash "$here/platform-tag.sh").tar.gz" echo "building ${asset} for release ${tag}" pixi run setup-tools pixi run dist bash "$here/package.sh" "$asset" dist TAG="$tag" ASSETS="$asset $asset.sha256" bash "$here/attach-asset.sh" echo "done: ${asset} attached to ${tag}"