Skip to content

Commit

Permalink
fix: tip now require go1.22.6 to compile
Browse files Browse the repository at this point in the history
(note: prebuilt go tip binaries seem no longer available.)

Signed-off-by: Maxime Soulé <[email protected]>
  • Loading branch information
maxatome committed Aug 21, 2024
1 parent 07386de commit 78e2ece
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.9.x, 1.10.x, 1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, tip]
go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, tip]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -74,10 +74,10 @@ jobs:
```
### Install last version of go 1.16 in current directory:
### Install last version of go 1.22 in current directory:
```
./install-go.pl 1.16.x
./install-go.pl 1.22.x
```

then
Expand Down
14 changes: 8 additions & 6 deletions install-go.pl
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@
$goroot = go_env('go', 'GOROOT');
}

# If go is already installed somewhere *and* ≥ 1.18, no need to install it
if ($goroot and go_version("$goroot/bin/go") ge v1.18)
# If go is already installed somewhere *and* ≥ 1.22.6, no need to install it
if ($goroot and go_version("$goroot/bin/go") ge v1.22.6)
{
my $goroot_tip = install_tip($goroot, $DESTDIR);
export_env("$DESTDIR/go", $goroot_tip);
exit 0;
}

$TARGET = '1.20.x';
$TARGET = '1.22.x';
$TIP = 1;
}

Expand Down Expand Up @@ -402,7 +402,7 @@ sub get_builder_type
return;
}

foreach my $key("$OS-$ARCH", ($ARCH eq 'amd64' ? $OS : ()))
foreach my $key ("$OS-$ARCH", ($ARCH eq 'amd64' ? $OS : ()))
{
# "darwin": "darwin-amd64-10_14",
# "darwin-amd64": "darwin-amd64-10_14",
Expand Down Expand Up @@ -497,8 +497,9 @@ sub mkdir_p
sub http_get
{
my $url = shift;
say STDERR "http_get $url"

if ($use_curl)
if (1 or $use_curl)
{
open(my $fh, '-|', curl => -sLD => '-', $url)
or die "Cannot fork: $!\n";
Expand All @@ -523,7 +524,8 @@ sub http_get
{ local $/ = "\r\n\r\n"; <$fh> }

# Redirect -> new header
last if $r{status} != 302 and $r{status} != 307;
say STDERR "STATUS=$r{status}"
last if $r{status} != 301 and $r{status} != 302 and $r{status} != 307;
}

local $/;
Expand Down

0 comments on commit 78e2ece

Please sign in to comment.