Skip to content

Commit c28da3a

Browse files
committed
⚗️ Investigate wsl: Failed to start the systemd user session #129
1 parent 9833fc7 commit c28da3a

File tree

8 files changed

+48
-90
lines changed

8 files changed

+48
-90
lines changed

linux-arm64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

linux-x64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

macos-arm64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

macos-x64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

nix-zip.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Param (
2+
[Parameter(Mandatory=$true)][string]$Version,
3+
[Parameter(Mandatory=$true)][string]$Directory,
4+
[Parameter(Mandatory=$true)][string]$Platform
5+
)
6+
7+
$ErrorActionPreference = 'Stop'
8+
Push-Location -Path "src\Xecrets.Cli\bin\Release\net8.0\publish\$Directory"
9+
try {
10+
$cmd = @(
11+
"exec {BASH_XTRACEFD}>&1"
12+
"set -euox pipefail"
13+
"chmod 775 XecretsCli"
14+
"mkdir 'XecretsCli-$Platform-$Version'"
15+
"cp -r XecretsCli 'XecretsCli-$Platform-$Version'"
16+
"tar -czvf 'XecretsCli-$Platform-$Version.tar.gz' 'XecretsCli-$Platform-$Version'"
17+
"rm -rf 'XecretsCli-$Platform-$Version'"
18+
) -join " && "
19+
20+
wsl bash -lc "$cmd"
21+
22+
if ($LASTEXITCODE -ne 0) {
23+
throw "WSL command failed with exit code $LASTEXITCODE"
24+
}
25+
}
26+
finally
27+
{
28+
Pop-Location
29+
}

win-arm64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

win-x64-zip.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

win-zip.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Param (
2+
[Parameter(Mandatory=$true)][string]$Version,
3+
[Parameter(Mandatory=$true)][string]$Directory,
4+
[Parameter(Mandatory=$true)][string]$Platform
5+
)
6+
7+
$workdir = (Get-Location)
8+
Push-Location -Path "src\Xecrets.Cli\bin\Release\net8.0\publish\$Directory"
9+
try {
10+
$compress = @{
11+
Path = "XecretsCli.exe"
12+
DestinationPath = "XecretsCli-$Platform-$Version.zip"
13+
}
14+
Compress-Archive @compress
15+
}
16+
finally
17+
{
18+
Pop-Location
19+
}

0 commit comments

Comments
 (0)