Version 27.1.0-rc.1: the suite series versions #24
No files matched your search
@@ -110,7 +110,10 @@ jobs:
|
||||
git fetch --quiet origin main
|
||||
git merge-base --is-ancestor "$(git rev-parse "${TAG}^{commit}")" origin/main \
|
||||
|| { echo "::error::$TAG is not on main"; exit 1; }
|
||||
want="v$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')"
|
||||
# The tag names the version as the binary shows it: Cargo's 27.1.0 is
|
||||
# v27.1 and 27.1.0-rc.1 is v27.1-rc.1 (src/version.rs).
|
||||
want="v$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version' \
|
||||
| sed -E 's/^([0-9]+[.][0-9]+)[.]0(-|$)/\1\2/')"
|
||||
[ "$TAG" = "$want" ] || { echo "::error::$TAG does not match Cargo.toml ($want)"; exit 1; }
|
||||
|
||||
build:
|
||||
@@ -187,7 +190,7 @@ jobs:
|
||||
id="$(curl -fsS "${auth[@]}" "$API/releases/tags/$TAG" 2>/dev/null | jq -r '.id // empty' || true)"
|
||||
if [ -z "$id" ]; then
|
||||
id="$(curl -fsS "${auth[@]}" -H 'Content-Type: application/json' \
|
||||
-d "$(jq -n --arg t "$TAG" --arg b "$notes" '{tag_name:$t, name:$t, draft:true, body:$b}')" \
|
||||
-d "$(jq -n --arg t "$TAG" --arg b "$notes" '{tag_name:$t, name:$t, draft:true, body:$b, prerelease:($t | contains("-rc."))}')" \
|
||||
"$API/releases" | jq -r '.id // empty')"
|
||||
[ -n "$id" ] || { echo "::error::could not create the release"; exit 1; }
|
||||
created=1
|
||||
|
||||
+12
-2
@@ -1,7 +1,17 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project are recorded here. Versions are dates:
|
||||
release `v2026.9.30` is version `2026.9.30`.
|
||||
All notable changes to this project are recorded here. Versions follow the
|
||||
inbuxa suite: a series (`27.1`), its patches (`27.1.3`) and release
|
||||
candidates before a series ships (`27.1-rc.1`). The tag is the version with a
|
||||
`v`. Releases before 27.1 were dates (`v2026.9.30`).
|
||||
|
||||
## [27.1-rc.1]
|
||||
|
||||
The first release candidate of the 27.1 series, with the rest of the suite.
|
||||
|
||||
### Changed
|
||||
- `--version` and the User-Agent show the version as tags name it
|
||||
(`27.1-rc.1`).
|
||||
|
||||
## [2026.10.26] -- 2026-10-26
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -1325,7 +1325,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "inbuxa-migrate"
|
||||
version = "2026.10.26"
|
||||
version = "27.1.0-rc.1"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"calcard",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "inbuxa-migrate"
|
||||
description = "Account migration and backup for inbuxa"
|
||||
version = "2026.10.26"
|
||||
version = "27.1.0-rc.1"
|
||||
authors = ["Coffey Labs LLC <[email protected]>"]
|
||||
license = "Apache-2.0 OR MIT"
|
||||
repository = "https://git.coffeylabs.org/inbuxa/inbuxa-migrate"
|
||||
|
||||
@@ -24,7 +24,9 @@ case "$(uname -m)" in
|
||||
esac
|
||||
|
||||
# The tag names the version the binary reports, so the two cannot disagree.
|
||||
want="v$(cd "$ROOT" && cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')"
|
||||
# Cargo's 27.1.0 is tagged v27.1, and 27.1.0-rc.1 v27.1-rc.1 (src/version.rs).
|
||||
want="v$(cd "$ROOT" && cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version' \
|
||||
| sed -E 's/^([0-9]+[.][0-9]+)[.]0(-|$)/\1\2/')"
|
||||
[ "$VERSION" = "$want" ] || { echo "tag $VERSION does not match Cargo.toml ($want)" >&2; exit 1; }
|
||||
|
||||
name="inbuxa-migrate-linux-$arch"
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ use crate::types::{ObjectType, parse_object_list};
|
||||
#[derive(Parser)]
|
||||
#[command(
|
||||
name = "inbuxa-migrate",
|
||||
version,
|
||||
version = crate::version::shown(),
|
||||
about = "inbuxa-migrate: account migration and backup for inbuxa"
|
||||
)]
|
||||
pub struct Cli {
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ impl DavClient {
|
||||
log_level: AtomicU8::new(LEVEL_DEFAULT),
|
||||
retries_total: AtomicU64::new(0),
|
||||
retry_after_sleeps: AtomicU64::new(0),
|
||||
user_agent: format!("inbuxa-migrate/{}", env!("CARGO_PKG_VERSION")),
|
||||
user_agent: format!("inbuxa-migrate/{}", crate::version::shown()),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ impl EwsClient {
|
||||
retries_total: AtomicU64::new(0),
|
||||
retry_after_sleeps: AtomicU64::new(0),
|
||||
soap_calls: AtomicU64::new(0),
|
||||
user_agent: format!("inbuxa-migrate/{}", env!("CARGO_PKG_VERSION")),
|
||||
user_agent: format!("inbuxa-migrate/{}", crate::version::shown()),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ impl GraphClient {
|
||||
retries_total: AtomicU64::new(0),
|
||||
retry_after_sleeps: AtomicU64::new(0),
|
||||
requests_total: AtomicU64::new(0),
|
||||
user_agent: format!("inbuxa-migrate/{}", env!("CARGO_PKG_VERSION")),
|
||||
user_agent: format!("inbuxa-migrate/{}", crate::version::shown()),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,4 @@ pub mod net;
|
||||
pub mod secret;
|
||||
pub mod sync;
|
||||
pub mod types;
|
||||
pub mod version;
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2026 Coffey Labs LLC <[email protected]>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
//! The version as tags name it: Cargo's `27.1.0` is `27.1`, `27.1.3` stays
|
||||
//! `27.1.3`, `27.1.0-rc.1` is `27.1-rc.1`, the same rule as the rest of the
|
||||
//! inbuxa suite. `--version` and the User-Agent show it; the release workflow
|
||||
//! checks the tag against it.
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
/// This build's version, as tags name it.
|
||||
pub fn shown() -> &'static str {
|
||||
static SHOWN: OnceLock<String> = OnceLock::new();
|
||||
SHOWN.get_or_init(|| display(env!("CARGO_PKG_VERSION")))
|
||||
}
|
||||
|
||||
fn display(cargo: &str) -> String {
|
||||
let (core, pre) = match cargo.split_once('-') {
|
||||
Some((core, pre)) => (core, Some(pre)),
|
||||
None => (cargo, None),
|
||||
};
|
||||
match core.strip_suffix(".0") {
|
||||
Some(series) if series.matches('.').count() == 1 => match pre {
|
||||
Some(pre) => format!("{series}-{pre}"),
|
||||
None => series.to_string(),
|
||||
},
|
||||
_ => cargo.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{display, shown};
|
||||
|
||||
#[test]
|
||||
fn shown_as_tags_name_it() {
|
||||
assert_eq!(display("27.1.0"), "27.1");
|
||||
assert_eq!(display("27.1.3"), "27.1.3");
|
||||
assert_eq!(display("27.1.0-rc.1"), "27.1-rc.1");
|
||||
assert_eq!(display("28.7.10"), "28.7.10");
|
||||
assert_eq!(display("2026.10.26"), "2026.10.26");
|
||||
assert!(!shown().is_empty());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user