mirror of
https://github.com/Twigpine/node.git
synced 2026-11-08 15:39:37 -10:00
* chore: rebrand user-facing gitlawb references to Twigpine
Rename the product name in docs, README, CLI help/output, MCP tool
descriptions, macOS app strings, installers, npm metadata and license
headers from gitlawb/Gitlawb to Twigpine. Point GitHub links at the
renamed Twigpine org (and fix the release workflow's repository guard,
which still matched Gitlawb/node), and switch the public node hosts and
website/install URLs to twigpine.com.
Protocol and operator identifiers are intentionally unchanged
(did:gitlawb, gitlawb://, signing domains, GITLAWB_* env vars, crate
and binary names, X-Gitlawb-* headers, icaptcha and peer-network URLs);
they need a follow-up migration.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: point image pulls at ghcr.io/twigpine/node and fix macOS DMG name
The release workflow publishes the container image to
ghcr.io/${GITHUB_REPOSITORY,,}, which is ghcr.io/twigpine/node since the
org rename; the old ghcr.io/gitlawb/node path no longer resolves for
anonymous pulls. Point the RUN-A-NODE docker run example, the OSS
readiness audit's claim about it, and the macOS app's generated compose
file at the published path.
The README listed the macOS DMG as "Twigpine Node.dmg", but
build-macos-app.sh writes GitlawbNode-macOS.dmg (kept on purpose), so
document the real file name.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(infra): keep the AWS security group description to avoid replacement
`description` on aws_security_group is ForceNew, so renaming it forced a
replace of the in-use group on the next apply of an existing deployment.
Restore the original text and note why it must stay until a separate
infra migration.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(macos): regenerate the app's compose file instead of treating it as a repo's
Config.repoPath fell back to the data directory when no repo clone was
found, and DockerCompose then picked up the compose file it had generated
there as if it belonged to a repo. The generator therefore only ran on
first launch, so upgraded installs kept their original compose, including
the old ghcr.io/gitlawb/node image, which no longer serves anonymous pulls.
repoPath now returns nil when there is no clone, and the app regenerates
its compose file whenever no repo compose is in use. Project directory and
named volumes are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(infra): default the AWS node image to ghcr.io/twigpine/node
release.yml publishes to ghcr.io/${GITHUB_REPOSITORY,,}, which is now
ghcr.io/twigpine/node; ghcr.io/gitlawb/node denies anonymous pulls, so the
default made new deployments fail to start and the upgrade command fail
on existing ones. On an existing deployment `terraform apply` only updates
the upgrade SSM document in place (user_data drift is ignored); the new
image is pulled on the next upgrade_command.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(macos): keep operator edits to the generated compose, migrate only the image
e04efe4 regenerated the app's compose file on every access, overwriting
edits operators make to pass settings the generated environment block
omits (e.g. GITLAWB_OPERATOR_STRICT_MODE). Generate the file only when it
is missing; when it exists, keep it and rewrite only references to the
retired ghcr.io/gitlawb/node image, keeping tags and digests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(macos): only migrate complete ghcr.io/gitlawb/node references
Without a left boundary the migration also rewrote the retired path when
it appeared inside a longer reference, such as a registry mirror
(registry.example.com/ghcr.io/gitlawb/node), pointing it at a path the
mirror may not have.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
125 lines
4.5 KiB
PowerShell
125 lines
4.5 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Twigpine installer for Windows - downloads pre-built binaries from GitHub Releases.
|
|
.EXAMPLE
|
|
irm https://twigpine.com/install.ps1 | iex
|
|
.EXAMPLE
|
|
& ([scriptblock]::Create((irm https://twigpine.com/install.ps1))) -Version v0.3.9
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$Version = "latest"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
# Windows PowerShell 5.1 may default to TLS 1.0; GitHub requires TLS 1.2+.
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
|
|
|
$Repo = if ($env:GITLAWB_RELEASE_REPO) { $env:GITLAWB_RELEASE_REPO } else { "Twigpine/node" }
|
|
$InstallDir = if ($env:GITLAWB_INSTALL_DIR) { $env:GITLAWB_INSTALL_DIR } else { "$env:LOCALAPPDATA\Programs\gitlawb" }
|
|
|
|
$arch = if ($env:PROCESSOR_ARCHITEW6432) {
|
|
$env:PROCESSOR_ARCHITEW6432
|
|
} else {
|
|
$env:PROCESSOR_ARCHITECTURE
|
|
}
|
|
if ($arch -ne "AMD64") {
|
|
throw "Unsupported architecture: $arch. Only x64 Windows binaries are published. Use WSL for arm64."
|
|
}
|
|
$target = "x86_64-pc-windows-msvc"
|
|
|
|
if ($Version -eq "latest") {
|
|
Write-Host "Fetching latest release version..."
|
|
$rel = Invoke-RestMethod -Uri "https://api.github.com/repos/$Repo/releases/latest" -UseBasicParsing -Headers @{ "User-Agent" = "gitlawb-installer" }
|
|
$tag = $rel.tag_name
|
|
} elseif ($Version.StartsWith("v")) {
|
|
$tag = $Version
|
|
} else {
|
|
$tag = "v$Version"
|
|
}
|
|
$ver = $tag.TrimStart("v")
|
|
|
|
$archive = "gitlawb-node-$ver-$target.zip"
|
|
$url = "https://github.com/$Repo/releases/download/$tag/$archive"
|
|
|
|
Write-Host "Installing Twigpine $tag for windows/x64"
|
|
Write-Host " Archive: $archive"
|
|
Write-Host " Into: $InstallDir"
|
|
|
|
$tmp = Join-Path ([System.IO.Path]::GetTempPath()) ("gitlawb-" + [System.Guid]::NewGuid().ToString("N"))
|
|
New-Item -ItemType Directory -Path $tmp | Out-Null
|
|
try {
|
|
$zipPath = Join-Path $tmp $archive
|
|
Write-Host "Downloading..."
|
|
Invoke-WebRequest -Uri $url -OutFile $zipPath -UseBasicParsing -Headers @{ "User-Agent" = "gitlawb-installer" }
|
|
|
|
# Verify checksum. Every published asset has a matching .sha256, so fail closed
|
|
# if it cannot be fetched rather than installing an unverified binary.
|
|
$sumPath = "$zipPath.sha256"
|
|
Invoke-WebRequest -Uri "$url.sha256" -OutFile $sumPath -UseBasicParsing -Headers @{ "User-Agent" = "gitlawb-installer" }
|
|
$expected = ((Get-Content $sumPath -Raw).Trim() -split '\s+')[0].ToLower()
|
|
$actual = (Get-FileHash $zipPath -Algorithm SHA256).Hash.ToLower()
|
|
if ($expected -ne $actual) {
|
|
throw "checksum mismatch! expected $expected got $actual"
|
|
}
|
|
Write-Host " checksum OK"
|
|
|
|
Write-Host "Extracting..."
|
|
$extract = Join-Path $tmp "extract"
|
|
Expand-Archive -Path $zipPath -DestinationPath $extract -Force
|
|
$pkgDir = Get-ChildItem -Path $extract -Directory | Select-Object -First 1
|
|
|
|
New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
|
|
# The Windows archive always ships the two CLI binaries; the daemon is optional.
|
|
$requiredBins = @("gl.exe", "git-remote-gitlawb.exe")
|
|
$optionalBins = @("gitlawb-node.exe")
|
|
$missing = $requiredBins | Where-Object {
|
|
-not (Test-Path (Join-Path $pkgDir.FullName $_))
|
|
}
|
|
if ($missing.Count -gt 0) {
|
|
throw "archive is missing required binaries: $($missing -join ', ')"
|
|
}
|
|
|
|
$installed = @()
|
|
foreach ($bin in $requiredBins + $optionalBins) {
|
|
$src = Join-Path $pkgDir.FullName $bin
|
|
if (Test-Path $src) {
|
|
Copy-Item -Path $src -Destination (Join-Path $InstallDir $bin) -Force
|
|
$installed += $bin
|
|
}
|
|
}
|
|
|
|
# Drop binaries no longer shipped (e.g. an optional one removed in a new release)
|
|
# so an upgrade in place never leaves a stale, mixed-version install behind.
|
|
foreach ($bin in $requiredBins + $optionalBins) {
|
|
if ($installed -notcontains $bin) {
|
|
$dst = Join-Path $InstallDir $bin
|
|
if (Test-Path $dst) { Remove-Item -Path $dst -Force }
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "Installed Twigpine $tag"
|
|
foreach ($bin in $installed) { Write-Host " $bin -> $InstallDir\$bin" }
|
|
}
|
|
finally {
|
|
Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
# Add to the user PATH if missing.
|
|
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
if (($userPath -split ';') -notcontains $InstallDir) {
|
|
$newPath = if ([string]::IsNullOrEmpty($userPath)) { $InstallDir } else { "$userPath;$InstallDir" }
|
|
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
|
|
Write-Host ""
|
|
Write-Host "Added $InstallDir to your PATH. Restart your terminal, then run:"
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host "Run:"
|
|
}
|
|
Write-Host " gl doctor"
|
|
Write-Host " gl quickstart"
|
|
Write-Host ""
|
|
Write-Host "Docs: https://docs.gitlawb.com"
|