Skip to content

Commit b8d8fab

Browse files
authored
Merge pull request #105 from kolyshkin/fix-mac-ci
Makefile: rm .SHELLFLAGS, add set -e
2 parents d4611de + b128335 commit b8d8fab

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Diff for: Makefile

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.SHELLFLAGS = -ec
21
PACKAGES ?= mountinfo mount signal symlink
32
BINDIR ?= _build/bin
43
CROSS ?= linux/arm linux/arm64 linux/ppc64le linux/s390x \
@@ -15,8 +14,9 @@ clean:
1514

1615
.PHONY: test
1716
test: test-local
17+
set -eu; \
1818
for p in $(PACKAGES); do \
19-
(cd $$p && go test $(RUN_VIA_SUDO) -v .); \
19+
(cd $$p; go test $(RUN_VIA_SUDO) -v .); \
2020
done
2121

2222
# Test the mount module against the local mountinfo source code instead of the
@@ -33,9 +33,11 @@ test-local:
3333
.PHONY: lint
3434
lint: $(BINDIR)/golangci-lint
3535
$(BINDIR)/golangci-lint version
36+
set -eu; \
3637
for p in $(PACKAGES); do \
37-
(cd $$p && go mod download \
38-
&& ../$(BINDIR)/golangci-lint run); \
38+
(cd $$p; \
39+
go mod download; \
40+
../$(BINDIR)/golangci-lint run); \
3941
done
4042

4143
$(BINDIR)/golangci-lint: $(BINDIR)
@@ -46,10 +48,11 @@ $(BINDIR):
4648

4749
.PHONY: cross
4850
cross:
51+
set -eu; \
4952
for osarch in $(CROSS); do \
5053
export GOOS=$${osarch%/*} GOARCH=$${osarch#*/}; \
5154
echo "# building for $$GOOS/$$GOARCH"; \
5255
for p in $(PACKAGES); do \
53-
(cd $$p && go build .); \
56+
(cd $$p; go build .); \
5457
done; \
5558
done

0 commit comments

Comments
 (0)