Delete the `obipipeline` crate and update all dependent crates to use the
published `obipipeline` version 0.2 from the `obi` registry. Migrate
specific pipeline logic into consuming crates: move error handling to
`obikindexer` and batch iteration logic to `obiskio`. Update build
scripts to support MSRV checking and improved dependency management.
- Delete `src/obipipeline/` entirely, removing the pipeline runtime,
scheduler, macros, and throttle implementations.
- Move `fmt` (now `pipeline_error`) from `obipipeline` error handling to
`src/obikindexer/src/graph_pipeline.rs` for graph building errors.
- Move `apply` (now `iter_canonical_kmer_batches_owned`) from
`obipipeline` pipe logic to `src/obiskio/src/unitig_index/reader.rs`
to provide lazy batch iteration for canonical kmers.
- Update `src/obikindexer`, `src/obikmerge`, `src/obikphylo`, and
`src/obiskim` to depend on `obipipeline` version 0.2 from the `obi`
registry instead of the local path.
- Refactor `src/obikindexer/src/graph_pipeline.rs` to use the new
`pipeline_error` function and update `build_graph` to accept an
iterator-returning `open` function.
- Refactor `src/obikmerge` to use `iter_canonical_kmer_batches_owned`
for streaming batches in `merge_partition` and `run_pass2`, replacing
previous pipeline stage logic.
- Refactor `src/obikphylo` to handle errors via `OKIError::InvalidData`
in `build_layer_sibling_annex` and `scan_layer_families`.
- Refactor `src/obiskim` to use `.expect("pipeline error")` for batch
processing in `query` and `superkmer` commands.
- Add `src/obiskio/src/unitig_index/reader.rs` method
`iter_canonical_kmer_batches_owned` for lazy batch iteration.
- Add `.crate-kit/scripts/msrv-check.sh` to verify the declared
`rust-version` builds successfully with the specified toolchain.
- Update `.crate-kit/scripts/deps-check.sh` and `deps-lib.sh` to
support `cargo update` with specific arguments and improved lockfile
handling.
- Update `.crate-kit/scripts/bump-version.sh` to use `sed -E` for
robust version string replacement in `README.md`.
- Update `.crate-kit/scripts/publish-guard.sh` and `publish.sh` to
enforce registry settings and exclude internal files from packages.
- Update `.gitea/workflows/release.yml` to pass the private cargo
registry index environment variable during macOS binary builds.
- Remove `Cargo.lock` from the repository root and update
`src/Cargo.lock` to reflect the new `obipipeline` dependency version.
- Update `src/Cargo.toml` workspace members to remove `obikseq` and
add `obifastwrite`.
41 lines
1.8 KiB
Bash
Executable File
41 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Publishes the current version on the $REGISTRY registry (private, or crates-io with CARGO_REGISTRY_TOKEN).
|
|
# DRY_RUN non-empty: assembles and builds the package without sending it.
|
|
#
|
|
# Idempotent: if the version is already published, it is a success (allows replaying the release
|
|
# workflow after a later failure). Authentication: variable CARGO_REGISTRIES_<REGISTRY>_TOKEN
|
|
# ("Bearer <token>"), otherwise built from the forge token (forge_token: FORGETOKEN in CI).
|
|
#
|
|
# --allow-dirty: in a colocated jj repository, git always sees the working copy as
|
|
# modified relative to its HEAD, even when the jj commit is already pushed.
|
|
set -euo pipefail
|
|
. "$(dirname "$0")/common.sh"
|
|
|
|
if [ "${PUBLISH:-yes}" = no ]; then
|
|
info " (kind ${CRATE_KIND:-crate}: nothing to publish on the registry)"
|
|
exit 0
|
|
fi
|
|
|
|
[ -n "$REGISTRY" ] || { err "✗ no registry: declare the kit extension (KIT_OVERLAY in the Makefile, org.mk) or set REGISTRY = crates-io"; exit 1; }
|
|
# Same safeguards as `make check` (publish = [...] and no internal file in the archive): the CI runs this script.
|
|
"$(dirname "$0")/publish-guard.sh"
|
|
version=$(current_version)
|
|
name=$(crate_name)
|
|
if [ -n "${DRY_RUN:-}" ]; then
|
|
warn "→ Checking the publication of $name $version (without sending)..."
|
|
"$CARGO" publish --registry "$REGISTRY" --allow-dirty --dry-run
|
|
exit 0
|
|
fi
|
|
|
|
warn "→ Publishing $name $version on registry $REGISTRY..."
|
|
log=$(mktemp)
|
|
trap 'rm -f -- "$log"' EXIT
|
|
if "$CARGO" publish --registry "$REGISTRY" --allow-dirty 2>&1 | tee "$log" >&2; then
|
|
ok "✓ $name $version published"
|
|
elif grep -qiE 'already (exists|uploaded)|crate version .* is already' "$log"; then
|
|
warn " $name $version is already published on $REGISTRY: nothing to do"
|
|
else
|
|
err "✗ Publication of $name $version failed"
|
|
exit 1
|
|
fi
|