Skip to content

Commit 5b6bdaa

Browse files
typelesslunny
authored andcommitted
Disable race detector for release builds
1 parent 782b968 commit 5b6bdaa

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.drone.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ steps:
520520
environment:
521521
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
522522
TAGS: bindata sqlite sqlite_unlock_notify
523+
RACE_ENABLED: "0"
523524

524525
- name: gpg-sign
525526
pull: always
@@ -616,6 +617,7 @@ steps:
616617
environment:
617618
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
618619
TAGS: bindata sqlite sqlite_unlock_notify
620+
RACE_ENABLED: "0"
619621

620622
- name: gpg-sign
621623
pull: always

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@ EXTRA_GOFLAGS ?=
6464
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
6565
MAKE_EVIDENCE_DIR := .make_evidence
6666

67-
ifneq ($(RACE_ENABLED),)
68-
ifeq ($(RACE_ENABLED),"all")
69-
GOFLAGS += -race
70-
GOTESTFLAGS += -race
71-
else
72-
GOTESTFLAGS ?= -race
73-
endif
67+
ifneq ($(RACE_ENABLED),"0")
68+
GOFLAGS += -race
69+
GOTESTFLAGS += -race
7470
endif
7571

7672
STORED_VERSION_FILE := VERSION

0 commit comments

Comments
 (0)