* does not support -X ldflag: https://github.com/golang/go/issues/25183 * does not support -cover testflag * needs CGO to be enabled to build syscall module * wants -gccgoflags, not -ldflags * don't test stuff we've disabled --- gitlab-runner-v12.1.0/Makefile 2019-07-19 12:13:32.000000000 +0000 +++ gitlab-runner-v12.1.0/Makefile 2020-04-26 23:58:20.823352305 +0000 @@ -4,7 +4,6 @@ export VERSION := $(shell ./ci/version) REVISION := $(shell git rev-parse --short=8 HEAD || echo unknown) BRANCH := $(shell git show-ref | grep "$(REVISION)" | grep -v HEAD | awk '{print $$2}' | sed 's|refs/remotes/origin/||' | sed 's|refs/heads/||' | sort | head -n 1) BUILT := $(shell date -u +%Y-%m-%dT%H:%M:%S%z) -export TESTFLAGS ?= -cover LATEST_STABLE_TAG := $(shell git -c versionsort.prereleaseSuffix="-rc" -c versionsort.prereleaseSuffix="-RC" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1) export IS_LATEST := @@ -45,14 +44,11 @@ export PATH := $(GOPATH_BIN):$(PATH) # Packages in vendor/ are included in ./... # https://github.com/golang/go/issues/11659 -export OUR_PACKAGES ?= $(subst _$(BUILD_DIR),$(PKG),$(shell go list ./... | grep -v '/vendor/')) +export OUR_PACKAGES ?= $(subst _$(BUILD_DIR),$(PKG),$(shell go list ./... | grep -ve '/vendor/' -e '/cache/gcs' -e '/cache/s3' -e '/docker' -e '/kubernetes' -e '/parallels' -e '/virtualbox')) -GO_LDFLAGS ?= -X $(COMMON_PACKAGE_NAMESPACE).NAME=$(PACKAGE_NAME) -X $(COMMON_PACKAGE_NAMESPACE).VERSION=$(VERSION) \ - -X $(COMMON_PACKAGE_NAMESPACE).REVISION=$(REVISION) -X $(COMMON_PACKAGE_NAMESPACE).BUILT=$(BUILT) \ - -X $(COMMON_PACKAGE_NAMESPACE).BRANCH=$(BRANCH) \ - -s -w +GO_LDFLAGS ?= -s -w GO_FILES ?= $(shell find . -name '*.go' | grep -v './.gopath/') -export CGO_ENABLED ?= 0 +export CGO_ENABLED ?= 1 # Development Tools @@ -114,7 +110,7 @@ build: $(GOX) build_simple: $(GOPATH_SETUP) # Building $(NAME) in version $(VERSION) for current platform go build \ - -ldflags "$(GO_LDFLAGS)" \ + -gccgoflags "$(GO_LDFLAGS)" \ -o "out/binaries/$(NAME)" \ $(PKG) @@ -123,7 +119,7 @@ build_current: helper-docker build_simpl check_race_conditions: @./scripts/check_race_conditions $(OUR_PACKAGES) -test: $(PKG_BUILD_DIR) helper-docker +test: $(PKG_BUILD_DIR) go test $(OUR_PACKAGES) $(TESTFLAGS) parallel_test_prepare: $(GOPATH_SETUP) --- gitlab-runner-v12.1.0/common/version.go 2019-07-19 12:13:32.000000000 +0000 +++ gitlab-runner-v12.1.0/common/version.go 2020-04-27 00:57:04.923408027 +0000 @@ -9,9 +9,9 @@ import ( ) var NAME = "gitlab-runner" -var VERSION = "development version" -var REVISION = "HEAD" -var BRANCH = "HEAD" +var VERSION = "12.1.0" +var REVISION = "v12.1.0" +var BRANCH = "12-1-stable" var BUILT = "unknown" var AppVersion AppVersionInfo