mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 22:47:30 +00:00
gocross-wrapper revisions
Signed-off-by: Aaron Klotz <aaron@tailscale.com>
This commit is contained in:
@@ -7,7 +7,7 @@ $ErrorActionPreference = 'Stop'
|
|||||||
Copies the global $args variable into an array, which is easier to work with
|
Copies the global $args variable into an array, which is easier to work with
|
||||||
when preparing to start child processes.
|
when preparing to start child processes.
|
||||||
#>
|
#>
|
||||||
function Copy-Args {
|
function Copy-GlobalArgs {
|
||||||
$list = [System.Collections.Generic.List[string]]::new($Global:args.Count)
|
$list = [System.Collections.Generic.List[string]]::new($Global:args.Count)
|
||||||
foreach ($arg in $Global:args) {
|
foreach ($arg in $Global:args) {
|
||||||
$list.Add($arg)
|
$list.Add($arg)
|
||||||
@@ -88,9 +88,8 @@ $bootstrapScriptBlock = {
|
|||||||
$tsgo = Join-Path $Env:USERPROFILE '.cache' 'tsgo'
|
$tsgo = Join-Path $Env:USERPROFILE '.cache' 'tsgo'
|
||||||
$toolchain = Join-Path $tsgo $rev
|
$toolchain = Join-Path $tsgo $rev
|
||||||
if (-not (Test-Path -LiteralPath "$toolchain.extracted" -PathType Leaf -ErrorAction SilentlyContinue)) {
|
if (-not (Test-Path -LiteralPath "$toolchain.extracted" -PathType Leaf -ErrorAction SilentlyContinue)) {
|
||||||
New-Item -Force -Path $tsgo -ItemType Directory
|
New-Item -Force -Path $tsgo -ItemType Directory | Out-Null
|
||||||
Remove-Item -Force -Recurse -LiteralPath $toolchain -ErrorAction Continue
|
Remove-Item -Force -Recurse -LiteralPath $toolchain -ErrorAction SilentlyContinue
|
||||||
Remove-Item -Force -LiteralPath "$toolchain.extracted" -ErrorAction Continue
|
|
||||||
Write-Log "Downloading Go toolchain $rev"
|
Write-Log "Downloading Go toolchain $rev"
|
||||||
|
|
||||||
# Values from https://web.archive.org/web/20250227081443/https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-9.0
|
# Values from https://web.archive.org/web/20250227081443/https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-9.0
|
||||||
@@ -190,7 +189,7 @@ $repoRoot = Get-RepoRoot
|
|||||||
$execEnv = Copy-Environment
|
$execEnv = Copy-Environment
|
||||||
$execEnv.Remove('GOROOT')
|
$execEnv.Remove('GOROOT')
|
||||||
|
|
||||||
$argList = Copy-Args
|
$argList = Copy-GlobalArgs
|
||||||
|
|
||||||
if ($Env:TS_USE_GOCROSS -ne '1') {
|
if ($Env:TS_USE_GOCROSS -ne '1') {
|
||||||
$revFile = Join-Path $repoRoot 'go.toolchain.rev' -Resolve
|
$revFile = Join-Path $repoRoot 'go.toolchain.rev' -Resolve
|
||||||
|
Reference in New Issue
Block a user