Skip to content

Commit 8a164e8

Browse files
committed
Switch to go 1.14
Signed-off-by: David Gageot <[email protected]>
1 parent f8aa46e commit 8a164e8

File tree

15 files changed

+131
-111
lines changed

15 files changed

+131
-111
lines changed

.travis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dist: xenial
22

33
language: go
4-
go: "1.13.x"
4+
go: "1.14.x"
55
go_import_path: /skaffold
66

77
git:
@@ -42,9 +42,6 @@ jobs:
4242
- $HOME/.cache/go-build
4343
- os: windows
4444
name: "Windows unit"
45-
env:
46-
- GO111MODULE=on
47-
- GOFLAGS="-mod=vendor"
4845
script:
4946
- go test -short -timeout 60s ./...
5047
cache:

DEVELOPMENT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This doc explains the development workflow so you can get started
99
You must install these tools:
1010

1111
1. [`go`](https://golang.org/doc/install): The language skaffold is
12-
built in (version >= go 1.13)
12+
built in (version >= go 1.14)
1313
1. [`git`](https://help.github.com/articles/set-up-git/): For source control
1414
1. [`make`](https://www.gnu.org/software/make/): For building skaffold.
1515
1. [`golangci-lint`](https://github.com/golangci/golangci-lint): You can use the

Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ ifeq "$(strip $(VERSION))" ""
4141
override VERSION = $(shell git describe --always --tags --dirty)
4242
endif
4343

44-
# Force using Go Modules and always read the dependencies from
45-
# the `vendor` folder.
46-
export GO111MODULE = on
47-
export GOFLAGS = -mod=vendor
48-
4944
LDFLAGS_linux = -static
5045
LDFLAGS_darwin =
5146
LDFLAGS_windows =
@@ -84,7 +79,6 @@ $(BUILD_DIR)/$(PROJECT)-%-$(GOARCH): $(STATIK_FILES) $(GO_FILES) $(BUILD_DIR) de
8479
docker build \
8580
--build-arg GOOS=$* \
8681
--build-arg GOARCH=$(GOARCH) \
87-
--build-arg GOFLAGS="$(GOFLAGS)" \
8882
--build-arg TAGS=$(GO_BUILD_TAGS_$(*)) \
8983
--build-arg LDFLAGS=$(GO_LDFLAGS_$(*)) \
9084
-f deploy/cross/Dockerfile \

Makefile.diag

-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ VERSION_PACKAGE = $(REPOPATH)/pkg/diag/version
2121

2222
TEST_PACKAGES := $(shell go list ./pkg/diag/...)
2323

24-
# Force using Go Modules and always read the dependencies from
25-
# the `vendor` folder.
26-
export GO111MODULE = on
27-
export GOFLAGS = -mod=vendor
28-
2924
$(BUILD_DIR):
3025
mkdir -p $(BUILD_DIR)
3126

deploy/cross/Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@
1414

1515
FROM dockercore/golang-cross:1.13.8 as base
1616

17+
# The base image is not yet available for go 1.14.
18+
# Let's just replace the Go that's installed with a newer one.
19+
RUN rm -Rf /usr/local/go && mkdir /usr/local/go
20+
RUN curl --fail --show-error --silent --location https://dl.google.com/go/go1.14.linux-amd64.tar.gz \
21+
| tar xz --directory=/usr/local/go --strip-components=1
22+
1723
# Cross compile Skaffold for Linux, Windows and MacOS
1824
ARG GOOS
1925
ARG GOARCH
20-
ARG GOFLAGS
2126
ARG TAGS
2227
ARG LDFLAGS
2328

2429
WORKDIR /skaffold
2530
COPY . ./
2631
RUN if [ "$GOOS" = "darwin" ]; then export CC=o64-clang CXX=o64-clang++; fi; \
27-
GOOS=$GOOS GOARCH=$GOARCH GOFLAGS=$GOFLAGS CGO_ENABLED=1 \
32+
GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=1 \
2833
go build -tags "${TAGS}" -ldflags "${LDFLAGS}" -o /build/skaffold ./cmd/skaffold

deploy/skaffold/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# This base image has to be updated manually after running `make build_deps`
16-
FROM gcr.io/k8s-skaffold/build_deps:d414a205df8d8307c92eff8e577cbf2691e46a34 as builder
16+
FROM gcr.io/k8s-skaffold/build_deps:28bbb2cbb0f23cc7a8af602c0513b3bcd74aa911 as builder
1717
WORKDIR /skaffold
1818
COPY . .
1919

deploy/skaffold/Dockerfile.deps

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
106106
jq \
107107
apt-transport-https && \
108108
rm -rf /var/lib/apt/lists/*
109-
COPY --from=golang:1.13 /usr/local/go /usr/local/go
109+
COPY --from=golang:1.14 /usr/local/go /usr/local/go
110110
ENV PATH /usr/local/go/bin:/root/go/bin:$PATH

deploy/webhook/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY --from=download-docsy /docsy ./themes/docsy
4444
COPY --from=download-hugo /hugo /usr/local/bin/
4545
COPY --from=download-kubectl /kubectl /usr/local/bin/
4646

47-
FROM golang:1.13 as webhook
47+
FROM golang:1.14 as webhook
4848
WORKDIR /skaffold
4949
COPY . .
5050
RUN go build -mod=vendor -o /webhook webhook/webhook.go

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/GoogleContainerTools/skaffold
22

3-
go 1.13
3+
go 1.14
44

55
replace (
66
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.0.1+incompatible

go.sum

-85
Large diffs are not rendered by default.

hack/build.bat

-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,5 @@ IF "%DIRTY" == "" SET TREE=clean ELSE SET TREE=dirty
3030
FOR /F "tokens=*" %%a in ('git rev-parse HEAD') do SET COMMIT=%%a
3131
for /f %%a in ('powershell -Command "Get-Date -format yyyy_MM_dd__HH_mm_ss"') do set BUILD_DATE=%%a
3232
set FLAG_LDFLAGS=" -X github.com/GoogleContainerTools/skaffold/pkg/skaffold/version.version=%VERSION% -X github.com/GoogleContainerTools/skaffold/pkg/skaffold/version.buildDate='%BUILD_DATE%' -X github.com/GoogleContainerTools/skaffold/pkg/skaffold/version.gitCommit=%COMMIT% -X github.com/GoogleContainerTools/skaffold/pkg/skaffold/version.gitTreeState=%TREE% -extldflags \"\""
33-
set GO111MODULE=on
34-
set GOFLAGS=-mod=vendor
3533

3634
go build -ldflags %FLAG_LDFLAGS% -o out/skaffold.exe github.com/GoogleContainerTools/skaffold/cmd/skaffold

hack/generate-statik.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ elif ! [ -x "$(command -v ${LICENSES})" ]; then
3434
# from a dependency.
3535
echo "Installing go-licenses"
3636
pushd $(mktemp -d)
37-
go mod init tmp; GOBIN=${BIN} go get -mod='' github.com/google/go-licenses
37+
go mod init tmp; GOBIN=${BIN} go get github.com/google/go-licenses
3838
popd
3939
fi
4040

hack/tools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module tools
22

3-
go 1.13
3+
go 1.14
44

55
require (
66
github.com/corneliusweig/release-notes v0.0.0-20191014214505-0be5c7c66752

hack/tools/vendor/modules.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# github.com/corneliusweig/release-notes v0.0.0-20191014214505-0be5c7c66752
2+
## explicit
23
github.com/corneliusweig/release-notes
34
# github.com/golang/protobuf v1.2.0
45
github.com/golang/protobuf/proto
@@ -11,6 +12,7 @@ github.com/inconshreveable/mousetrap
1112
# github.com/konsorten/go-windows-terminal-sequences v1.0.1
1213
github.com/konsorten/go-windows-terminal-sequences
1314
# github.com/rakyll/statik v0.1.6
15+
## explicit
1416
github.com/rakyll/statik
1517
# github.com/sirupsen/logrus v1.4.2
1618
github.com/sirupsen/logrus

0 commit comments

Comments
 (0)