This commit is contained in:
lda
2026-04-14 07:16:57 +07:00 Unverified
parent 744686c215
commit 9ffa6ce5e6
5 changed files with 31 additions and 8 deletions
+26 -7
View File
@@ -47,15 +47,34 @@ cargo build --release
# Publish crate (only if -Publish and registry auth is available) # Publish crate (only if -Publish and registry auth is available)
# Publish crate (only if -Publish). Relies on your Cargo config/credentials. # Publish crate (only if -Publish). Relies on your Cargo config/credentials.
if ($Publish) { if ($Publish) {
try { $publishOrder = @(
$pubArgs = @('publish') 'lda-ipjs',
if ($Registry) { $pubArgs += @('--registry', $Registry) } 'wakey-core',
cargo @pubArgs 'wakey-linux',
'wakey',
'wakey-agent',
'wakey-control-plane'
)
Write-Host ("published. ran cargo {0}" -f ($pubArgs -join " ")) foreach ($pkg in $publishOrder) {
$pubArgs = @('publish', '-p', $pkg)
if ($Registry) { $pubArgs += @('--registry', $Registry) }
Write-Host ("publishing {0}..." -f $pkg)
$publishOutput = & cargo @pubArgs 2>&1
$publishOutput | ForEach-Object { Write-Host $_ }
if ($LASTEXITCODE -ne 0) {
$joined = ($publishOutput | Out-String)
if ($joined -match 'already exists' -or $joined -match 'already uploaded') {
Write-Warning ("skip {0}: version already present in registry" -f $pkg)
continue
} }
catch {
Write-Warning ("cargo publish failed: {0}" -f $_) throw ("cargo publish failed for {0}. ran: cargo {1}" -f $pkg, ($pubArgs -join ' '))
}
Write-Host ("published {0}." -f $pkg)
} }
} }
+1
View File
@@ -2,6 +2,7 @@
name = "wakey-agent" name = "wakey-agent"
version = "0.0.1" version = "0.0.1"
edition = "2024" edition = "2024"
publish = ["gitea"]
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"
+1
View File
@@ -2,6 +2,7 @@
name = "wakey-control-plane" name = "wakey-control-plane"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"
publish = ["gitea"]
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"
+1
View File
@@ -2,6 +2,7 @@
name = "wakey-core" name = "wakey-core"
version = "0.2.0" version = "0.2.0"
edition = "2024" edition = "2024"
publish = ["gitea"]
[dependencies] [dependencies]
macaddr = { version = "1", features = ["serde", "serde_std"] } macaddr = { version = "1", features = ["serde", "serde_std"] }
+1
View File
@@ -2,6 +2,7 @@
name = "wakey-linux" name = "wakey-linux"
version = "0.2.0" version = "0.2.0"
edition = "2024" edition = "2024"
publish = ["gitea"]
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"