Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: include mutagen binary in installer#47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deansheather merged 2 commits intomainfromdean/mutagen-installer
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletionsscripts/Publish.ps1
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,6 +83,30 @@ function Add-CoderSignature([string] $path) {
}
}

function Download-File([string] $url, [string] $outputPath, [string] $etagFile) {
Write-Host "Downloading '$url' to '$outputPath'"
# We use `curl.exe` here because `Invoke-WebRequest` is notoriously slow.
& curl.exe `
--progress-bar `
--show-error `
--fail `
--location `
--etag-compare $etagFile `
--etag-save $etagFile `
--output $outputPath `
$url
if ($LASTEXITCODE -ne 0) { throw "Failed to download $url" }
if (!(Test-Path $outputPath) -or (Get-Item $outputPath).Length -eq 0) {
throw "Failed to download '$url', output file '$outputPath' is missing or empty"
}
}

$goArch = switch ($arch) {
"x64" { "amd64" }
"arm64" { "arm64" }
default { throw "Unsupported architecture: $arch" }
}

# CD to the root of the repo
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
Push-Location $repoRoot
Expand DownExpand Up@@ -145,6 +169,24 @@ if ($null -eq $wintunDllSrc) {
$wintunDllDest = Join-Path $vpnFilesPath "wintun.dll"
Copy-Item $wintunDllSrc $wintunDllDest

# Download the mutagen binary from our bucket for this platform if we don't have
# it yet (or it's different).
$mutagenVersion = "v0.18.1"
$mutagenSrcPath = Join-Path $repoRoot "scripts\files\mutagen-windows-$($goArch).exe"
$mutagenSrcUrl = "https://storage.googleapis.com/coder-desktop/mutagen/$($mutagenVersion)/mutagen-windows-$($goArch).exe"
$mutagenEtagFile = $mutagenSrcPath + ".etag"
Download-File $mutagenSrcUrl $mutagenSrcPath $mutagenEtagFile
$mutagenDestPath = Join-Path $vpnFilesPath "mutagen.exe"
Copy-Item $mutagenSrcPath $mutagenDestPath

# Download mutagen agents tarball.
$mutagenAgentsSrcPath = Join-Path $repoRoot "scripts\files\mutagen-agents.tar.gz"
$mutagenAgentsSrcUrl = "https://storage.googleapis.com/coder-desktop/mutagen/$($mutagenVersion)/mutagen-agents.tar.gz"
$mutagenAgentsEtagFile = $mutagenAgentsSrcPath + ".etag"
Download-File $mutagenAgentsSrcUrl $mutagenAgentsSrcPath $mutagenAgentsEtagFile
$mutagenAgentsDestPath = Join-Path $vpnFilesPath "mutagen-agents.tar.gz"
Copy-Item $mutagenAgentsSrcPath $mutagenAgentsDestPath

# Build the MSI installer
& dotnet.exe run --project .\Installer\Installer.csproj -c Release -- `
build-msi `
Expand Down
3 changes: 3 additions & 0 deletionsscripts/files/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
mutagen-*.tar.gz
mutagen-*.exe
*.etag
Loading

[8]ページ先頭

©2009-2025 Movatter.jp