update publish script (#1203)

This commit is contained in:
Chris Titus
2026-02-06 19:34:36 -06:00
committed by GitHub
parent c6ca91f6c1
commit 3bb64c3f7b
3 changed files with 31 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ default-members = ["tui", "core"]
resolver = "2"
[workspace.package]
license = "MIT"
version = "26.1.22"
version = "26.2.6"
edition = "2021"
[profile.release]
+29 -6
View File
@@ -54,19 +54,42 @@ if [[ -z "$workspace_version" || -z "$core_version" || -z "$tui_dep_version" ]];
exit 1
fi
# Function to update version in a TOML file
update_toml_version() {
local file=$1
local old_version=$2
local new_version=$3
echo "Updating version in $file from $old_version to $new_version..."
sed -i "s/version = \"$old_version\"/version = \"$new_version\"/" "$file"
}
version_updated=false
if [[ "$workspace_version" != "$expected_version" ]]; then
echo "Workspace version $workspace_version does not match today's expected $expected_version." >&2
exit 1
echo "Workspace version $workspace_version does not match today's expected $expected_version."
update_toml_version "Cargo.toml" "$workspace_version" "$expected_version"
version_updated=true
fi
if [[ "$core_version" != "$expected_version" ]]; then
echo "linutil_core package version $core_version does not match today's expected $expected_version." >&2
exit 1
echo "linutil_core package version $core_version does not match today's expected $expected_version."
# Core uses workspace version, so if workspace was updated, this should be fine
if [[ "$workspace_version" == "$core_version" ]]; then
echo "Core version will be updated via workspace version."
fi
fi
if [[ "$tui_dep_version" != "$expected_version" ]]; then
echo "linutil_tui depends on linutil_core $tui_dep_version but expected $expected_version." >&2
exit 1
echo "linutil_tui depends on linutil_core $tui_dep_version but expected $expected_version."
update_toml_version "tui/Cargo.toml" "$tui_dep_version" "$expected_version"
version_updated=true
fi
if [[ "$version_updated" == true ]]; then
echo "Versions have been updated to $expected_version."
echo "Please review the changes and run the script again to proceed with publishing."
exit 0
fi
echo "Version check passed: $expected_version"
+1 -1
View File
@@ -26,7 +26,7 @@ tips = ["rand"]
[dependencies]
clap = { version = "4.5.56", features = ["derive"] }
image = { version = "0.25.6", default-features = false, features = ["ico", "png"] }
linutil_core = { version = "26.1.22", path = "../core" }
linutil_core = { version = "26.2.6", path = "../core" }
nix = { version = "0.29.0", features = [ "user" ] }
oneshot = { version = "0.1.12", features = ["std"], default-features = false }
portable-pty = "0.9.0"