blob: c8704280c39954d33e67e341fde9b86436a4b760 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
* 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 -rV | awk '!/rc/' | head -n 1)
export IS_LATEST :=
@@ -36,14 +35,11 @@ export PATH := $(GOPATH_BIN):$(PATH)
BUILD_DIR := $(CURDIR)
TARGET_DIR := $(BUILD_DIR)/out
export MAIN_PACKAGE ?= gitlab.com/gitlab-org/gitlab-runner
-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) \
- -w
+GO_LDFLAGS ?= -w
GO_FILES ?= $(shell find . -name '*.go')
-export CGO_ENABLED ?= 0
+export CGO_ENABLED ?= 1
# Development Tools
@@ -137,7 +133,7 @@ build_current: helper-docker build_simpl
simple-test: TEST_PKG ?= $(shell go list ./...)
simple-test:
# use env -i to clear parent environment variables for go test
- ./scripts/go_test_no_env $(TEST_PKG) $(TESTFLAGS) -ldflags "$(GO_LDFLAGS)"
+ ./scripts/go_test_no_env $(TEST_PKG) $(TESTFLAGS) -gccgoflags "$(GO_LDFLAGS)"
git1.8-test: export TEST_PKG = gitlab.com/gitlab-org/gitlab-runner/executors/shell gitlab.com/gitlab-org/gitlab-runner/shells
git1.8-test:
--- gitlab-runner-v13.0.0/Makefile.build.mk.old 2020-05-20 03:10:39.000000000 -0500
+++ gitlab-runner-v13.0.0/Makefile.build.mk 2024-05-30 22:18:11.590776424 -0500
@@ -1,6 +1,5 @@
runner-bin: $(GOX)
# Building $(NAME) in version $(VERSION) for $(BUILD_PLATFORMS)
- $(GOX) $(BUILD_PLATFORMS) \
- -ldflags "$(GO_LDFLAGS)" \
- -output="out/binaries/$(NAME)-{{.OS}}-{{.Arch}}" \
+ go build -v \
+ -gccgoflags "$(GO_LDFLAGS)" \
$(PKG)
--- 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 = "15.0.0"
+var REVISION = "v15.0.0"
+var BRANCH = "15-0-stable"
var BUILT = "unknown"
var AppVersion AppVersionInfo
|