@@ -10,6 +10,17 @@ cleanup() {
10
10
11
11
trap cleanup EXIT HUP INT TERM
12
12
13
+ # This script relies on GOPATH mode. The GOPATH workspace
14
+ # must contain both github.com/gopherjs/gopherjs and
15
+ # github.com/gopherjs/gopherjs.github.io repositories.
16
+ export GO111MODULE=off
17
+
18
+ # TODO: This script relies on $(go env GOROOT) not being user-writable.
19
+ # It can be improved to work even when $(go env GOROOT) is user-writable
20
+ # by making a GOROOT copy here, immediately chmod-ing it to be non-user-writable,
21
+ # and later on chmod-ing it be user-writable again.
22
+ # See https://github.com/gopherjs/gopherjs.github.io/issues/69.
23
+
13
24
go install github.com/gopherjs/gopherjs/...
14
25
15
26
go generate github.com/gopherjs/gopherjs.github.io/playground/internal/imports
@@ -33,10 +44,12 @@ mkdir -p pkg/github.com/gopherjs/gopherjs
33
44
cp " $GOPATH " /pkg/* _js_min/github.com/gopherjs/gopherjs/js.a pkg/github.com/gopherjs/gopherjs/js.a
34
45
cp " $GOPATH " /pkg/* _js_min/github.com/gopherjs/gopherjs/nosync.a pkg/github.com/gopherjs/gopherjs/nosync.a
35
46
36
- # Make a copy of GOROOT that is user-writeable ,
47
+ # Make a copy of GOROOT that is user-writable ,
37
48
# use it to build and copy out standard library packages.
49
+ echo " copying GOROOT from $( go env GOROOT) to $tmp /goroot"
38
50
cp -a " $( go env GOROOT) " " $tmp /goroot"
39
51
export GOROOT=" $tmp /goroot"
52
+ unset GOPHERJS_GOROOT # force $GOROOT to be used
40
53
gopherjs install -m \
41
54
archive/tar \
42
55
archive/zip \
@@ -125,6 +138,7 @@ gopherjs install -m \
125
138
strconv \
126
139
strings \
127
140
sync/atomic \
141
+ syscall/js \
128
142
testing \
129
143
testing/iotest \
130
144
testing/quick \
0 commit comments