feat: complete production workflow migration
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#Requires -RunAsAdministrator
|
||||
param(
|
||||
[string]$ProjectRoot = "",
|
||||
[string]$NssmPath = "nssm.exe"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ([string]::IsNullOrWhiteSpace($ProjectRoot)) {
|
||||
$ProjectRoot = if ($env:GYXX_PROJECT_ROOT) {
|
||||
$env:GYXX_PROJECT_ROOT
|
||||
} else {
|
||||
(Resolve-Path (Join-Path $PSScriptRoot "..\..\..\..\..\..")).Path
|
||||
}
|
||||
}
|
||||
$uninstaller = Join-Path $ProjectRoot "deploy\windows-service\uninstall.ps1"
|
||||
if (-not (Test-Path -LiteralPath $uninstaller -PathType Leaf)) {
|
||||
throw "Server scheduler uninstaller is missing: $uninstaller"
|
||||
}
|
||||
|
||||
& $uninstaller -NssmPath $NssmPath
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,22 @@
|
||||
#Requires -RunAsAdministrator
|
||||
param(
|
||||
[string]$ProjectRoot = "",
|
||||
[string]$DataRoot = "",
|
||||
[string]$NssmPath = "nssm.exe"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ([string]::IsNullOrWhiteSpace($ProjectRoot)) {
|
||||
$ProjectRoot = if ($env:GYXX_PROJECT_ROOT) {
|
||||
$env:GYXX_PROJECT_ROOT
|
||||
} else {
|
||||
(Resolve-Path (Join-Path $PSScriptRoot "..\..\..\..\..\..")).Path
|
||||
}
|
||||
}
|
||||
$installer = Join-Path $ProjectRoot "deploy\windows-service\install.ps1"
|
||||
if (-not (Test-Path -LiteralPath $installer -PathType Leaf)) {
|
||||
throw "Server scheduler installer is missing: $installer"
|
||||
}
|
||||
|
||||
& $installer -ProjectRoot $ProjectRoot -DataRoot $DataRoot -NssmPath $NssmPath
|
||||
exit $LASTEXITCODE
|
||||
Reference in New Issue
Block a user