build: add Gitea release wrapper
Rust CI JohnSlop passed all CI checks.
Gitea/john_slop/pipeline/head This commit looks good
Details
Rust CI JohnSlop passed all CI checks.
Gitea/john_slop/pipeline/head This commit looks good
Details
This commit is contained in:
parent
dc21a5bf34
commit
5c2ff0dca9
|
|
@ -39,3 +39,20 @@ which must be recorded or controlled by the release environment.
|
|||
The packaging smoke test produced byte-identical archives in two consecutive
|
||||
runs on the Milestone 7 development host and validated both archive and internal
|
||||
checksums.
|
||||
|
||||
## Publish with rust_realease
|
||||
|
||||
Install [`rust_realease`](https://proxy.dandaedre.com/gitea/idle-org/rust_realease),
|
||||
then pass the path of a readable Gitea token file to the repository wrapper:
|
||||
|
||||
```sh
|
||||
./release.sh /path/to/token.txt --dry-run
|
||||
./release.sh /path/to/token.txt
|
||||
```
|
||||
|
||||
The wrapper keeps the token out of command-line arguments, exports it as
|
||||
`GITEA_TOKEN` only to `rust_realease`, selects the `john_slop` workspace package,
|
||||
and publishes raw binary artifacts. Additional arguments are forwarded, so use
|
||||
`--dry-run` before publication and `--replace-assets` only after reviewing an
|
||||
existing release collision. The checkout must be clean and its local and remote
|
||||
`vX.Y.Z` tags must match the package version as required by `rust_realease`.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <gitea-token-file> [rust_realease options...]" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ "$#" -ge 1 ] || usage
|
||||
token_file=$1
|
||||
shift
|
||||
|
||||
if [ ! -f "$token_file" ] || [ ! -r "$token_file" ]; then
|
||||
echo "token file is not a readable regular file: $token_file" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if ! command -v rust_realease >/dev/null 2>&1; then
|
||||
echo "rust_realease is not installed or not available in PATH" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
GITEA_TOKEN=
|
||||
IFS= read -r GITEA_TOKEN <"$token_file" || :
|
||||
if [ -z "$GITEA_TOKEN" ]; then
|
||||
echo "token file is empty: $token_file" >&2
|
||||
exit 2
|
||||
fi
|
||||
export GITEA_TOKEN
|
||||
|
||||
repository_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
exec rust_realease \
|
||||
"$repository_dir" \
|
||||
--package john_slop \
|
||||
--artifact-format binary \
|
||||
"$@"
|
||||
10
tasks.md
10
tasks.md
|
|
@ -719,6 +719,16 @@ can rebuild the same release commit with an earlier `dist/` bundle or legacy
|
|||
SBOM intermediates still present; the locked dependency graph passes the
|
||||
configured audit and deny policies.
|
||||
|
||||
## Post-milestone release publishing
|
||||
|
||||
- [x] Add a small `release.sh` wrapper that reads a Gitea token from a supplied
|
||||
file, keeps it out of process arguments, and delegates the tagged `john_slop`
|
||||
release to `rust_realease` with optional arguments such as `--dry-run`.
|
||||
|
||||
Acceptance: missing, unreadable, and empty token files fail before publication;
|
||||
the token reaches `rust_realease` through `GITEA_TOKEN`, never an argument; and
|
||||
the wrapper selects the root workspace package and binary artifact mode.
|
||||
|
||||
## Deferred by design
|
||||
|
||||
- Statistical or model-based authorship classification.
|
||||
|
|
|
|||
Loading…
Reference in New Issue