patch 2
This commit is contained in:
+1
-1
@@ -24,4 +24,4 @@ strip = true
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["very-smart-parsing"]
|
default = ["very-smart-parsing"]
|
||||||
very-smart-parsing = [] # this is the a-bit-redundant parse thing that copilot made
|
very-smart-parsing = [] # this is the a-bit-redundant parse thing that copilot made
|
||||||
|
|||||||
+11
-2
@@ -38,7 +38,10 @@ if (-not (Test-Path $configFile)) {
|
|||||||
}
|
}
|
||||||
if ($ForceConfigure) {
|
if ($ForceConfigure) {
|
||||||
Write-Host "Config not found. Initializing non-interactively (ForceConfigure)..."
|
Write-Host "Config not found. Initializing non-interactively (ForceConfigure)..."
|
||||||
|
$configParent = Split-Path -Parent $configFile
|
||||||
|
Push-Location $configParent
|
||||||
& $RunnerPath register --no-interactive --config $configFile --instance $ServerUrl --token $Token --labels $Labels
|
& $RunnerPath register --no-interactive --config $configFile --instance $ServerUrl --token $Token --labels $Labels
|
||||||
|
Pop-Location
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host "Config not found. Run this manually once (note labels embed host executor on Windows):"
|
Write-Host "Config not found. Run this manually once (note labels embed host executor on Windows):"
|
||||||
@@ -49,9 +52,15 @@ if (-not (Test-Path $configFile)) {
|
|||||||
|
|
||||||
if ($Attach) {
|
if ($Attach) {
|
||||||
Write-Host "Starting act_runner (attached)... Ctrl+C to stop"
|
Write-Host "Starting act_runner (attached)... Ctrl+C to stop"
|
||||||
|
$configParent = Split-Path -Parent $configFile
|
||||||
|
Push-Location $configParent
|
||||||
& $RunnerPath daemon --config $configFile
|
& $RunnerPath daemon --config $configFile
|
||||||
|
Pop-Location
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Start-Process -FilePath $RunnerPath -ArgumentList @("daemon", "--config", $configFile) -WindowStyle Hidden
|
$configParent = Split-Path -Parent $configFile
|
||||||
Write-Host "act_runner started."
|
Push-Location $configParent
|
||||||
|
$proc = Start-Process -FilePath $RunnerPath -ArgumentList @("daemon", "--config", $configFile) -WindowStyle Hidden -PassThru
|
||||||
|
Pop-Location
|
||||||
|
Write-Host "act_runner started (PID=$($proc.Id))."
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -31,10 +31,11 @@ if (-not $Version) {
|
|||||||
if ($Version) {
|
if ($Version) {
|
||||||
$pattern = '(?m)^version\s*=\s*"[^"]+"'
|
$pattern = '(?m)^version\s*=\s*"[^"]+"'
|
||||||
$replacement = ('version = "{0}"' -f $Version)
|
$replacement = ('version = "{0}"' -f $Version)
|
||||||
(Get-Content Cargo.toml -Raw) -replace $pattern, $replacement | Set-Content Cargo.toml -Encoding UTF8
|
(Get-Content Cargo.toml -Raw) -replace $pattern, $replacement | Set-Content Cargo.toml -Encoding UTF8 -NoNewline
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ensure build ok
|
# Ensure build ok
|
||||||
|
cargo fmt
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
# Publish crate (only if -Publish and registry auth is available)
|
# Publish crate (only if -Publish and registry auth is available)
|
||||||
@@ -52,7 +53,7 @@ if ($Publish) {
|
|||||||
|
|
||||||
if ($Tag -and $Version) {
|
if ($Tag -and $Version) {
|
||||||
# If you git push a tag, this will trigger the act_runner and the release workflow on your self-hosted runner (see .gitea/workflows/release.yml)
|
# If you git push a tag, this will trigger the act_runner and the release workflow on your self-hosted runner (see .gitea/workflows/release.yml)
|
||||||
$actRunnerScript = Join-Path (Split-Path -Parent $PSScriptRoot) 'act_runner.ps1'
|
$actRunnerScript = Join-Path $PSScriptRoot 'act_runner.ps1'
|
||||||
if (Test-Path $actRunnerScript) {
|
if (Test-Path $actRunnerScript) {
|
||||||
Write-Host "Ensuring act_runner is running..."
|
Write-Host "Ensuring act_runner is running..."
|
||||||
& $actRunnerScript
|
& $actRunnerScript
|
||||||
|
|||||||
Reference in New Issue
Block a user