Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

Commit 8552867

Browse files
committed
Prepare Go 1.25.5 package for predownloaded x/text module
1 parent 249d37c commit 8552867

5 files changed

Lines changed: 17 additions & 3 deletions

File tree

packages/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99

1010
!go/**/cacheprog.go
1111
!go/**/go.mod
12+
!go/**/go.sum

packages/go/1.25.5/build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
3+
24
curl -LO https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
35
tar -xzf go1.25.5.linux-amd64.tar.gz
46
rm go1.25.5.linux-amd64.tar.gz
@@ -7,6 +9,11 @@ rm go1.25.5.linux-amd64.tar.gz
79
CGO_ENABLED=0 ./go/bin/go build -o cacheprog cacheprog.go
810

911
# Pre-build standard library cache
10-
export GOCACHE=$PWD/cache
11-
mkdir -p $GOCACHE
12+
export GOCACHE="$PWD/cache"
13+
mkdir -p "$GOCACHE"
1214
CGO_ENABLED=0 ./go/bin/go build std
15+
16+
# Pre-download selected golang.org/x modules for offline builds.
17+
export GOPATH="$PWD/gopath"
18+
mkdir -p "$GOPATH"
19+
CGO_ENABLED=0 ./go/bin/go mod download

packages/go/1.25.5/compile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
23

34
cp /piston/packages/go/1.25.5/go.mod ./go.mod
5+
cp /piston/packages/go/1.25.5/go.sum ./go.sum
6+
47
export GOCACHEPROG="/piston/packages/go/1.25.5/cacheprog /piston/packages/go/1.25.5/cache"
5-
CGO_ENABLED=0 go build -o binary *.go && \
8+
CGO_ENABLED=0 go build -o binary *.go
69
chmod +x binary

packages/go/1.25.5/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module piston
22

33
go 1.25.5
4+
5+
require golang.org/x/text v0.34.0

packages/go/1.25.5/go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=

0 commit comments

Comments
 (0)