Bläddra i källkod

build: skip go clean on PPA, messes with the module trick

Péter Szilágyi 6 år sedan
förälder
incheckning
5b558ad936
4 ändrade filer med 6 tillägg och 22 borttagningar
  1. 1 1
      Makefile
  2. 1 1
      build/ci.go
  3. 0 19
      build/clean_go_build_cache.sh
  4. 4 1
      build/deb/ethereum/deb.rules

+ 1 - 1
Makefile

@@ -36,7 +36,7 @@ lint: ## Run linters.
 	build/env.sh go run build/ci.go lint
 
 clean:
-	./build/clean_go_build_cache.sh
+	go clean -cache
 	rm -fr build/_workspace/pkg/ $(GOBIN)/*
 
 # The devtools target installs tools required for 'go generate'.

+ 1 - 1
build/ci.go

@@ -530,7 +530,7 @@ func doDebianSource(cmdline []string) {
 				log.Fatalf("Failed to copy Go module dependencies: %v", err)
 			}
 			// Run the packaging and upload to the PPA
-			debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz")
+			debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz", "-nc")
 			debuild.Dir = pkgdir
 			build.MustRun(debuild)
 

+ 0 - 19
build/clean_go_build_cache.sh

@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# Cleaning the Go cache only makes sense if we actually have Go installed... or
-# if Go is actually callable. This does not hold true during deb packaging, so
-# we need an explicit check to avoid build failures.
-if ! command -v go > /dev/null; then
-  exit
-fi
-
-version_gt() {
-  test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"
-}
-
-golang_version=$(go version |cut -d' ' -f3 |sed 's/go//')
-
-# Clean go build cache when go version is greater than or equal to 1.10
-if !(version_gt 1.10 $golang_version); then
-    go clean -cache
-fi

+ 4 - 1
build/deb/ethereum/deb.rules

@@ -4,10 +4,13 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# Launchpad rejects Go's access to $HOME/.cache, use custom folder
+# Launchpad rejects Go's access to $HOME, use custom folders
 export GOCACHE=/tmp/go-build
 export GOROOT_BOOTSTRAP={{.GoBootPath}}
 
+override_dh_auto_clean:
+	# Don't try to be smart Launchpad, we know our build rules better than you
+
 override_dh_auto_build:
 	# We can't download a fresh Go within Launchpad, so we're shipping and building
 	# one on the fly. However, we can't build it inside the go-ethereum folder as