mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
dev: fix: build ci.go
This commit is contained in:
parent
ab28b8ac5c
commit
f1e7f6db28
1 changed files with 3 additions and 24 deletions
25
build/ci.go
25
build/ci.go
|
|
@ -241,8 +241,8 @@ func doInstall(cmdline []string) {
|
||||||
func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (flags []string) {
|
func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (flags []string) {
|
||||||
var ld []string
|
var ld []string
|
||||||
if env.Commit != "" {
|
if env.Commit != "" {
|
||||||
ld = append(ld, "-X", "github.com/ethereum/go-ethereum/internal/version.gitCommit="+env.Commit)
|
ld = append(ld, "-X", "github.com/maticnetwork/bor/internal/version.gitCommit="+env.Commit)
|
||||||
ld = append(ld, "-X", "github.com/ethereum/go-ethereum/internal/version.gitDate="+env.Date)
|
ld = append(ld, "-X", "github.com/maticnetwork/bor/internal/version.gitDate="+env.Date)
|
||||||
}
|
}
|
||||||
// Strip DWARF on darwin. This used to be required for certain things,
|
// Strip DWARF on darwin. This used to be required for certain things,
|
||||||
// and there is no downside to this, so we just keep doing it.
|
// and there is no downside to this, so we just keep doing it.
|
||||||
|
|
@ -653,7 +653,6 @@ func doDebianSource(cmdline []string) {
|
||||||
}
|
}
|
||||||
// Download and verify the Go source packages.
|
// Download and verify the Go source packages.
|
||||||
var (
|
var (
|
||||||
gobootbundle = downloadGoBootstrapSources(*cachedir)
|
|
||||||
gobundle = downloadGoSources(*cachedir)
|
gobundle = downloadGoSources(*cachedir)
|
||||||
)
|
)
|
||||||
// Download all the dependencies needed to build the sources and run the ci script
|
// Download all the dependencies needed to build the sources and run the ci script
|
||||||
|
|
@ -678,13 +677,6 @@ func doDebianSource(cmdline []string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add bootstrapper Go source code
|
|
||||||
if err := build.ExtractArchive(gobootbundle, pkgdir); err != nil {
|
|
||||||
log.Fatalf("Failed to extract bootstrapper Go sources: %v", err)
|
|
||||||
}
|
|
||||||
if err := os.Rename(filepath.Join(pkgdir, "go"), filepath.Join(pkgdir, ".goboot")); err != nil {
|
|
||||||
log.Fatalf("Failed to rename bootstrapper Go source folder: %v", err)
|
|
||||||
}
|
|
||||||
// Add builder Go source code
|
// Add builder Go source code
|
||||||
if err := build.ExtractArchive(gobundle, canonicalPath); err != nil {
|
if err := build.ExtractArchive(gobundle, canonicalPath); err != nil {
|
||||||
log.Fatalf("Failed to extract builder Go sources: %v", err)
|
log.Fatalf("Failed to extract builder Go sources: %v", err)
|
||||||
|
|
@ -719,19 +711,6 @@ func doDebianSource(cmdline []string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// downloadGoBootstrapSources downloads the Go source tarball that will be used
|
|
||||||
// to bootstrap the builder Go.
|
|
||||||
func downloadGoBootstrapSources(cachedir string) string {
|
|
||||||
csdb := build.MustLoadChecksums("build/checksums.txt")
|
|
||||||
file := fmt.Sprintf("go%s.src.tar.gz", gobootVersion)
|
|
||||||
url := "https://dl.google.com/go/" + file
|
|
||||||
dst := filepath.Join(cachedir, file)
|
|
||||||
if err := csdb.DownloadFile(url, dst); err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
// downloadGoSources downloads the Go source tarball.
|
// downloadGoSources downloads the Go source tarball.
|
||||||
func downloadGoSources(cachedir string) string {
|
func downloadGoSources(cachedir string) string {
|
||||||
csdb := build.MustLoadChecksums("build/checksums.txt")
|
csdb := build.MustLoadChecksums("build/checksums.txt")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue