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
|
- name: Build Windows exe
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: .\build\windows\build.ps1 -Configuration release
|
run: .\build\windows\build.ps1 -Configuration release -Package
|
||||||
|
|
||||||
- name: Upload exe
|
- name: Upload exe
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: one-kvm-windows-exe
|
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
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
@@ -170,7 +170,8 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ inputs.release_tag }}
|
tag_name: ${{ inputs.release_tag }}
|
||||||
|
prerelease: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: |
|
||||||
release-artifacts/deb/*.deb
|
release-artifacts/deb/*.deb
|
||||||
release-artifacts/windows/one-kvm.exe
|
release-artifacts/windows/*.exe
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "one-kvm"
|
name = "one-kvm"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["SilentWind"]
|
authors = ["SilentWind"]
|
||||||
description = "A open and lightweight IP-KVM solution written in Rust"
|
description = "A open and lightweight IP-KVM solution written in Rust"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ param(
|
|||||||
[string]$VcpkgInstalledRoot = $env:VCPKG_INSTALLED_DIR,
|
[string]$VcpkgInstalledRoot = $env:VCPKG_INSTALLED_DIR,
|
||||||
[switch]$NoDefaultFeatures,
|
[switch]$NoDefaultFeatures,
|
||||||
[string[]]$Features = @(),
|
[string[]]$Features = @(),
|
||||||
|
[switch]$Package,
|
||||||
[Parameter(ValueFromRemainingArguments = $true)]
|
[Parameter(ValueFromRemainingArguments = $true)]
|
||||||
[string[]]$CargoArgs = @()
|
[string[]]$CargoArgs = @()
|
||||||
)
|
)
|
||||||
@@ -64,3 +65,23 @@ if ($Features.Count -gt 0) {
|
|||||||
$cargoCommand += $CargoArgs
|
$cargoCommand += $CargoArgs
|
||||||
|
|
||||||
cargo @cargoCommand
|
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()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn placeholder_html() -> &'static str {
|
pub fn placeholder_html() -> String {
|
||||||
r#"<!DOCTYPE html>
|
r#"<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@@ -181,8 +181,9 @@ pub fn placeholder_html() -> &'static str {
|
|||||||
<h1>One-KVM</h1>
|
<h1>One-KVM</h1>
|
||||||
<p>Frontend not built yet.</p>
|
<p>Frontend not built yet.</p>
|
||||||
<p>Please build the frontend or access the API directly.</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>"#
|
</html>"#
|
||||||
|
.replace("{{VERSION}}", env!("CARGO_PKG_VERSION"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||||
"name": "one-kvm",
|
"name": "one-kvm",
|
||||||
"version-string": "0.2.0",
|
"version-string": "0.2.1",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "ffmpeg",
|
"name": "ffmpeg",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Reference in New Issue
Block a user