Add scripts for building and managing RustDesk versions
Some checks failed
rustdesk-auto-build / build-and-publish (push) Has been cancelled
Some checks failed
rustdesk-auto-build / build-and-publish (push) Has been cancelled
- Implement Build-CustomRustDesk.ps1 to build RustDesk with specified version and configuration. - Create Get-LastBuiltVersion.ps1 to retrieve the last built version from a state file. - Add Get-LatestRustDeskVersion.ps1 to fetch the latest version from GitHub releases. - Develop Invoke-RustDeskPipeline.ps1 to orchestrate the build and deployment process. - Introduce Publish-Artifacts.ps1 for publishing build artifacts via SMB or SCP. - Implement Set-LastBuiltVersion.ps1 to update the state file with the last built version.
This commit is contained in:
18
scripts/Get-LastBuiltVersion.ps1
Normal file
18
scripts/Get-LastBuiltVersion.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
function Get-LastBuiltVersion {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$StateFilePath
|
||||
)
|
||||
|
||||
if (-not (Test-Path -LiteralPath $StateFilePath)) {
|
||||
return $null
|
||||
}
|
||||
|
||||
$content = Get-Content -LiteralPath $StateFilePath -Raw -ErrorAction Stop
|
||||
if ([string]::IsNullOrWhiteSpace($content)) {
|
||||
return $null
|
||||
}
|
||||
|
||||
return $content.Trim()
|
||||
}
|
||||
Reference in New Issue
Block a user