mirror of
https://github.com/hanzoai/index.git
synced 2026-10-30 18:34:27 +00:00
Devs are the users here, so an internal name is a user-visible name. This finishes what the previous commit started on the serving surface: MEILISEARCH_* / meilisearch_* -> INDEX_* / index_* (statics, metrics) MEILI_* -> INDEX_* (env vars) Meili-Include-Metadata -> Index-Include-Metadata (HTTP header) MeiliParams, meili_client, setup_meilisearch, and every remaining prose mention -> the index equivalents 519 files, 1621 insertions and 1621 deletions — a 1:1 substitution, no structural change. **This changes the deployment contract**: the binary now reads INDEX_MASTER_KEY, INDEX_ENV and INDEX_DB_PATH. The App CR in hanzoai/universe must move to those names IN THE SAME ROLLOUT as the new image — the running 1.37.0 still reads MEILI_*, so flipping the CR early would start it with no master key. CI now publishes ghcr.io/hanzoai/index, matching the repo. There is no Rust toolchain on the box this was authored on, and building images locally is against policy anyway, so CI is the compiler: a red build here costs nothing because production is pinned to 1.37.0 and is not touched by it. NOT renamed: the crate/directory names (milli, search, search-types...). Those move Cargo.toml paths and workspace members together and deserve their own verified pass, not a blind one. Co-authored-by: Hanzo Dev <[email protected]>
30 lines
1.0 KiB
Rust
30 lines
1.0 KiB
Rust
fn main() {
|
|
if let Err(err) = emit_git_variables() {
|
|
println!("cargo:warning=vergen: {}", err);
|
|
}
|
|
}
|
|
|
|
fn emit_git_variables() -> anyhow::Result<()> {
|
|
println!("cargo::rerun-if-env-changed=INDEX_NO_VERGEN");
|
|
|
|
let has_vergen =
|
|
!matches!(std::env::var_os("INDEX_NO_VERGEN"), Some(x) if x != "false" && x != "0");
|
|
|
|
anyhow::ensure!(has_vergen, "disabled via `INDEX_NO_VERGEN`");
|
|
|
|
// Note: any code that needs VERGEN_ environment variables should take care to define them manually in the Dockerfile and pass them
|
|
// in the corresponding GitHub workflow (publish_docker.yml).
|
|
// This is due to the Dockerfile building the binary outside of the git directory.
|
|
let mut builder = vergen_gitcl::GitclBuilder::default();
|
|
|
|
builder.branch(true);
|
|
builder.commit_timestamp(true);
|
|
builder.commit_message(true);
|
|
builder.describe(true, true, None);
|
|
builder.sha(false);
|
|
|
|
let git2 = builder.build()?;
|
|
|
|
vergen_gitcl::Emitter::default().fail_on_error().add_instructions(&git2)?.emit()
|
|
}
|