@@ -136,23 +136,6 @@ var (
136
136
"golang-go" : "/usr/lib/go" ,
137
137
}
138
138
139
- // This is the version of Go that will be downloaded by
140
- //
141
- // go run ci.go install -dlgo
142
- dlgoVersion = "1.21.1"
143
-
144
- // This is the version of Go that will be used to bootstrap the PPA builder.
145
- //
146
- // This version is fine to be old and full of security holes, we just use it
147
- // to build the latest Go. Don't change it. If it ever becomes insufficient,
148
- // we need to switch over to a recursive builder to jumpt across supported
149
- // versions.
150
- gobootVersion = "1.19.6"
151
-
152
- // This is the version of execution-spec-tests that we are using.
153
- // When updating, you must also update build/checksums.txt.
154
- executionSpecTestsVersion = "1.0.2"
155
-
156
139
// This is where the tests should be unpacked.
157
140
executionSpecTestsDir = "tests/spec-tests"
158
141
)
@@ -192,6 +175,8 @@ func main() {
192
175
doWindowsInstaller (os .Args [2 :])
193
176
case "purge" :
194
177
doPurge (os .Args [2 :])
178
+ case "sanitycheck" :
179
+ doSanityCheck ()
195
180
default :
196
181
log .Fatal ("unknown command " , os .Args [1 ])
197
182
}
@@ -213,9 +198,8 @@ func doInstall(cmdline []string) {
213
198
tc := build.GoToolchain {GOARCH : * arch , CC : * cc }
214
199
if * dlgo {
215
200
csdb := build .MustLoadChecksums ("build/checksums.txt" )
216
- tc .Root = build .DownloadGo (csdb , dlgoVersion )
201
+ tc .Root = build .DownloadGo (csdb )
217
202
}
218
-
219
203
// Disable CLI markdown doc generation in release builds.
220
204
buildTags := []string {"urfave_cli_no_docs" }
221
205
@@ -312,7 +296,7 @@ func doTest(cmdline []string) {
312
296
// Configure the toolchain.
313
297
tc := build.GoToolchain {GOARCH : * arch , CC : * cc }
314
298
if * dlgo {
315
- tc .Root = build .DownloadGo (csdb , dlgoVersion )
299
+ tc .Root = build .DownloadGo (csdb )
316
300
}
317
301
gotest := tc .Go ("test" )
318
302
@@ -345,6 +329,10 @@ func doTest(cmdline []string) {
345
329
346
330
// downloadSpecTestFixtures downloads and extracts the execution-spec-tests fixtures.
347
331
func downloadSpecTestFixtures (csdb * build.ChecksumDB , cachedir string ) string {
332
+ executionSpecTestsVersion , err := build .Version (csdb , "spec-tests" )
333
+ if err != nil {
334
+ log .Fatal (err )
335
+ }
348
336
ext := ".tar.gz"
349
337
base := "fixtures" // TODO(MariusVanDerWijden) rename once the version becomes part of the filename
350
338
url := fmt .Sprintf ("https://github.com/ethereum/execution-spec-tests/releases/download/v%s/%s%s" , executionSpecTestsVersion , base , ext )
@@ -377,9 +365,11 @@ func doLint(cmdline []string) {
377
365
378
366
// downloadLinter downloads and unpacks golangci-lint.
379
367
func downloadLinter (cachedir string ) string {
380
- const version = "1.51.1"
381
-
382
368
csdb := build .MustLoadChecksums ("build/checksums.txt" )
369
+ version , err := build .Version (csdb , "golangci" )
370
+ if err != nil {
371
+ log .Fatal (err )
372
+ }
383
373
arch := runtime .GOARCH
384
374
ext := ".tar.gz"
385
375
@@ -761,6 +751,10 @@ func doDebianSource(cmdline []string) {
761
751
// to bootstrap the builder Go.
762
752
func downloadGoBootstrapSources (cachedir string ) string {
763
753
csdb := build .MustLoadChecksums ("build/checksums.txt" )
754
+ gobootVersion , err := build .Version (csdb , "ppa-builder" )
755
+ if err != nil {
756
+ log .Fatal (err )
757
+ }
764
758
file := fmt .Sprintf ("go%s.src.tar.gz" , gobootVersion )
765
759
url := "https://dl.google.com/go/" + file
766
760
dst := filepath .Join (cachedir , file )
@@ -773,6 +767,10 @@ func downloadGoBootstrapSources(cachedir string) string {
773
767
// downloadGoSources downloads the Go source tarball.
774
768
func downloadGoSources (cachedir string ) string {
775
769
csdb := build .MustLoadChecksums ("build/checksums.txt" )
770
+ dlgoVersion , err := build .Version (csdb , "golang" )
771
+ if err != nil {
772
+ log .Fatal (err )
773
+ }
776
774
file := fmt .Sprintf ("go%s.src.tar.gz" , dlgoVersion )
777
775
url := "https://dl.google.com/go/" + file
778
776
dst := filepath .Join (cachedir , file )
@@ -1099,3 +1097,7 @@ func doPurge(cmdline []string) {
1099
1097
log .Fatal (err )
1100
1098
}
1101
1099
}
1100
+
1101
+ func doSanityCheck () {
1102
+ build .DownloadAndVerifyChecksums (build .MustLoadChecksums ("build/checksums.txt" ))
1103
+ }
0 commit comments