chore: bump version to v0.2.1

This commit is contained in:
mofeng-git
2026-05-20 00:09:31 +08:00
parent 1f7cfb373c
commit 2e0ca89943
6 changed files with 31 additions and 8 deletions

View File

@@ -129,13 +129,13 @@ jobs:
- name: Build Windows exe
shell: pwsh
run: .\build\windows\build.ps1 -Configuration release
run: .\build\windows\build.ps1 -Configuration release -Package
- name: Upload exe
uses: actions/upload-artifact@v4
with:
name: one-kvm-windows-exe
path: target/x86_64-pc-windows-msvc/release/one-kvm.exe
path: target/x86_64-pc-windows-msvc/release/one-kvm_*.exe
if-no-files-found: error
retention-days: 7
@@ -170,7 +170,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.release_tag }}
prerelease: true
generate_release_notes: true
files: |
release-artifacts/deb/*.deb
release-artifacts/windows/one-kvm.exe
release-artifacts/windows/*.exe

View File

@@ -1,6 +1,6 @@
[package]
name = "one-kvm"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["SilentWind"]
description = "A open and lightweight IP-KVM solution written in Rust"

View File

@@ -6,6 +6,7 @@ param(
[string]$VcpkgInstalledRoot = $env:VCPKG_INSTALLED_DIR,
[switch]$NoDefaultFeatures,
[string[]]$Features = @(),
[switch]$Package,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$CargoArgs = @()
)
@@ -64,3 +65,23 @@ if ($Features.Count -gt 0) {
$cargoCommand += $CargoArgs
cargo @cargoCommand
if ($Package) {
$metadata = cargo metadata --no-deps --format-version 1 | ConvertFrom-Json
$packageInfo = $metadata.packages | Where-Object { $_.name -eq "one-kvm" } | Select-Object -First 1
if ($null -eq $packageInfo -or [string]::IsNullOrWhiteSpace($packageInfo.version)) {
throw "Failed to resolve version from Cargo metadata"
}
$sourcePath = Join-Path $repoRoot "target/$Target/release/one-kvm.exe"
$targetName = "one-kvm_{0}_amd64.exe" -f $packageInfo.version
$targetPath = Join-Path $repoRoot "target/$Target/release/$targetName"
if (-not (Test-Path $sourcePath)) {
throw "Windows binary not found: $sourcePath"
}
Copy-Item $sourcePath $targetPath
Write-Host $targetPath
}

View File

@@ -149,7 +149,7 @@ fn static_response(path: &str, data: Vec<u8>) -> Response<Body> {
.unwrap()
}
pub fn placeholder_html() -> &'static str {
pub fn placeholder_html() -> String {
r#"<!DOCTYPE html>
<html lang="en">
<head>
@@ -181,8 +181,9 @@ pub fn placeholder_html() -> &'static str {
<h1>One-KVM</h1>
<p>Frontend not built yet.</p>
<p>Please build the frontend or access the API directly.</p>
<div class="version">v0.2.0</div>
<div class="version">v{{VERSION}}</div>
</div>
</body>
</html>"#
.replace("{{VERSION}}", env!("CARGO_PKG_VERSION"))
}

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "one-kvm",
"version-string": "0.2.0",
"version-string": "0.2.1",
"dependencies": [
{
"name": "ffmpeg",

View File

@@ -1,7 +1,7 @@
{
"name": "web",
"private": true,
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"scripts": {
"dev": "vite",