Skip to content

Commit d6a56f2

Browse files
committed
chore: rename GOPATH_LINUX_BIN to LINUX_GOBIN
Shorter, clearer name for the environment variable that specifies where Linux binaries are stored for Docker tests.
1 parent 2e38198 commit d6a56f2

33 files changed

Lines changed: 127 additions & 127 deletions

File tree

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ GOHOSTARCH := $(shell go env GOHOSTARCH)
1515

1616
# On non-Linux systems, use a separate directory for Linux binaries
1717
ifeq ($(GOHOSTOS),linux)
18-
export GOPATH_LINUX_BIN ?= $(GOPATH)/bin
18+
export LINUX_GOBIN ?= $(GOPATH)/bin
1919
else
20-
export GOPATH_LINUX_BIN ?= $(GOPATH)/linux_$(GOHOSTARCH)
20+
export LINUX_GOBIN ?= $(GOPATH)/linux_$(GOHOSTARCH)
2121
endif
2222

2323
######################
@@ -53,11 +53,11 @@ install:
5353
@echo "Installing dgraph ($(GOHOSTOS)/$(GOHOSTARCH))..."
5454
@$(MAKE) -C dgraph install
5555
ifneq ($(GOHOSTOS),linux)
56-
@mkdir -p $(GOPATH_LINUX_BIN)
56+
@mkdir -p $(LINUX_GOBIN)
5757
@echo "Installing dgraph (linux/$(GOHOSTARCH))..."
5858
@GOOS=linux GOARCH=$(GOHOSTARCH) $(MAKE) -C dgraph dgraph
59-
@mv dgraph/dgraph $(GOPATH_LINUX_BIN)/dgraph
60-
@echo "Installed dgraph (linux/$(GOHOSTARCH)) to $(GOPATH_LINUX_BIN)/dgraph"
59+
@mv dgraph/dgraph $(LINUX_GOBIN)/dgraph
60+
@echo "Installed dgraph (linux/$(GOHOSTARCH)) to $(LINUX_GOBIN)/dgraph"
6161
endif
6262

6363

@@ -68,7 +68,7 @@ uninstall:
6868

6969
.PHONY: dgraph-installed
7070
dgraph-installed:
71-
@if [ ! -f "$(GOPATH)/bin/dgraph" ] || [ ! -f "$(GOPATH_LINUX_BIN)/dgraph" ]; then \
71+
@if [ ! -f "$(GOPATH)/bin/dgraph" ] || [ ! -f "$(LINUX_GOBIN)/dgraph" ]; then \
7272
echo "Dgraph binary missing, running make install..."; \
7373
$(MAKE) install; \
7474
fi

TESTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,16 @@ That's it! The `make install` command:
237237
- On **macOS**: Installs native binary to `$GOPATH/bin/dgraph` AND Linux binary to
238238
`$GOPATH/linux_<arch>/dgraph`
239239

240-
The Docker Compose files automatically use the correct binary path via the `GOPATH_LINUX_BIN`
241-
environment variable.
240+
The Docker Compose files automatically use the correct binary path via the `LINUX_GOBIN` environment
241+
variable.
242242

243243
### macOS Notes
244244

245245
The build system now automatically handles cross-compilation for macOS users:
246246

247247
- `make install` builds both native macOS and Linux binaries automatically
248248
- Linux binaries are stored in `$GOPATH/linux_<arch>/dgraph`
249-
- Docker Compose files use `${GOPATH_LINUX_BIN:-$GOPATH/bin}` to find the correct binary
249+
- Docker Compose files use `${LINUX_GOBIN:-$GOPATH/bin}` to find the correct binary
250250
- No manual binary swapping required!
251251

252252
After code changes, simply run `make install` again — it handles everything.
@@ -1208,9 +1208,9 @@ The following items from the original wishlist have been implemented:
12081208
and automatically builds the correct binaries. On macOS, `make install` builds both native and
12091209
Linux binaries without manual intervention.
12101210

1211-
- **✅ Automatic binary path management:** The `GOPATH_LINUX_BIN` environment variable is
1212-
automatically set based on OS. Docker Compose files use `${GOPATH_LINUX_BIN:-$GOPATH/bin}` to
1213-
mount the correct binary.
1211+
- **✅ Automatic binary path management:** The `LINUX_GOBIN` environment variable is automatically
1212+
set based on OS. Docker Compose files use `${LINUX_GOBIN:-$GOPATH/bin}` to mount the correct
1213+
binary.
12141214

12151215
- **✅ No manual setup scripts required:** The `make test` target now depends on `dgraph-installed`
12161216
which automatically builds binaries if missing. Dependency checking scripts in `t/scripts/` can

dgraph/docker-compose.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
service: zero
1212
volumes:
1313
- type: bind
14-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
14+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1515
target: /gobin
1616
read_only: true
1717
command:
@@ -32,7 +32,7 @@ services:
3232
service: zero
3333
volumes:
3434
- type: bind
35-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
35+
source: ${LINUX_GOBIN:-$GOPATH/bin}
3636
target: /gobin
3737
read_only: true
3838
command:
@@ -52,7 +52,7 @@ services:
5252
service: zero
5353
volumes:
5454
- type: bind
55-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
55+
source: ${LINUX_GOBIN:-$GOPATH/bin}
5656
target: /gobin
5757
read_only: true
5858
command:
@@ -64,7 +64,7 @@ services:
6464
working_dir: /data/alpha1
6565
volumes:
6666
- type: bind
67-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
67+
source: ${LINUX_GOBIN:-$GOPATH/bin}
6868
target: /gobin
6969
read_only: true
7070
- type: bind
@@ -94,7 +94,7 @@ services:
9494
- alpha1
9595
volumes:
9696
- type: bind
97-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
97+
source: ${LINUX_GOBIN:-$GOPATH/bin}
9898
target: /gobin
9999
read_only: true
100100
- type: bind
@@ -124,7 +124,7 @@ services:
124124
- alpha2
125125
volumes:
126126
- type: bind
127-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
127+
source: ${LINUX_GOBIN:-$GOPATH/bin}
128128
target: /gobin
129129
read_only: true
130130
- type: bind
@@ -154,7 +154,7 @@ services:
154154
- alpha3
155155
volumes:
156156
- type: bind
157-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
157+
source: ${LINUX_GOBIN:-$GOPATH/bin}
158158
target: /gobin
159159
read_only: true
160160
- type: bind
@@ -184,7 +184,7 @@ services:
184184
- alpha4
185185
volumes:
186186
- type: bind
187-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
187+
source: ${LINUX_GOBIN:-$GOPATH/bin}
188188
target: /gobin
189189
read_only: true
190190
- type: bind
@@ -214,7 +214,7 @@ services:
214214
- alpha5
215215
volumes:
216216
- type: bind
217-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
217+
source: ${LINUX_GOBIN:-$GOPATH/bin}
218218
target: /gobin
219219
read_only: true
220220
- type: bind

systest/1million/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- "6080"
1111
volumes:
1212
- type: bind
13-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
13+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1414
target: /gobin
1515
read_only: true
1616
- type: volume

systest/21million/bulk/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- "6080"
1111
volumes:
1212
- type: bind
13-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
13+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1414
target: /gobin
1515
read_only: true
1616
- type: volume

systest/21million/live/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
- "9080"
1313
volumes:
1414
- type: bind
15-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
15+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1616
target: /gobin
1717
read_only: true
1818
command:
@@ -28,7 +28,7 @@ services:
2828
- "6080"
2929
volumes:
3030
- type: bind
31-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
31+
source: ${LINUX_GOBIN:-$GOPATH/bin}
3232
target: /gobin
3333
read_only: true
3434
command:

systest/acl/restore/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- 9080
1111
volumes:
1212
- type: bind
13-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
13+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1414
target: /gobin
1515
read_only: true
1616
- type: bind
@@ -38,7 +38,7 @@ services:
3838
- 6080
3939
volumes:
4040
- type: bind
41-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
41+
source: ${LINUX_GOBIN:-$GOPATH/bin}
4242
target: /gobin
4343
read_only: true
4444
command:

systest/audit/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- "9080"
99
volumes:
1010
- type: bind
11-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
11+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1212
target: /gobin
1313
read_only: true
1414
- type: bind
@@ -28,7 +28,7 @@ services:
2828
- "6080"
2929
volumes:
3030
- type: bind
31-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
31+
source: ${LINUX_GOBIN:-$GOPATH/bin}
3232
target: /gobin
3333
read_only: true
3434
- type: bind

systest/audit_encrypted/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- "9080"
99
volumes:
1010
- type: bind
11-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
11+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1212
target: /gobin
1313
read_only: true
1414
- type: bind
@@ -32,7 +32,7 @@ services:
3232
- "6080"
3333
volumes:
3434
- type: bind
35-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
35+
source: ${LINUX_GOBIN:-$GOPATH/bin}
3636
target: /gobin
3737
read_only: true
3838
- type: bind

systest/backup/advanced-scenarios/127-Namespace/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
- 9080
1515
volumes:
1616
- type: bind
17-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
17+
source: ${LINUX_GOBIN:-$GOPATH/bin}
1818
target: /gobin
1919
read_only: true
2020
- type: bind
@@ -37,7 +37,7 @@ services:
3737
- 6080
3838
volumes:
3939
- type: bind
40-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
40+
source: ${LINUX_GOBIN:-$GOPATH/bin}
4141
target: /gobin
4242
read_only: true
4343
- data-volume:/data/backups/
@@ -57,7 +57,7 @@ services:
5757
- 9080
5858
volumes:
5959
- type: bind
60-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
60+
source: ${LINUX_GOBIN:-$GOPATH/bin}
6161
target: /gobin
6262
read_only: true
6363
- type: bind
@@ -79,7 +79,7 @@ services:
7979
- 6080
8080
volumes:
8181
- type: bind
82-
source: ${GOPATH_LINUX_BIN:-$GOPATH/bin}
82+
source: ${LINUX_GOBIN:-$GOPATH/bin}
8383
target: /gobin
8484
read_only: true
8585
- data-volume:/data/backups/

0 commit comments

Comments
 (0)