mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-14 03:32:00 +08:00
chore: bump version to v0.2.1
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"))
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "web",
|
||||
"private": true,
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user