Skip to content

Commit

Permalink
Stop setting GO111MODULE=on
Browse files Browse the repository at this point in the history
It's the default since Go 1.16.

In theory the environment might be setting it to off, and breaking
our builds; unless something compelling comes up, I think that
hypothetical environment should be changed, nowadays.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Mar 26, 2024
1 parent d847108 commit b6b60bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BUILD_TAGS_DARWIN_CROSS = containers_image_openpgp
BUILDTAGS = btrfs_noversion libdm_no_deferred_remove
BUILDFLAGS := -tags "$(BUILDTAGS)"

PACKAGES := $(shell GO111MODULE=on go list $(BUILDFLAGS) ./...)
PACKAGES := $(shell go list $(BUILDFLAGS) ./...)
SOURCE_DIRS = $(shell echo $(PACKAGES) | awk 'BEGIN{FS="/"; RS=" "}{print $$4}' | uniq)

PREFIX ?= ${DESTDIR}/usr
Expand All @@ -41,7 +41,7 @@ export PATH := $(PATH):${GOBIN}
all: tools test validate .gitvalidation

build:
GO111MODULE="on" go build $(BUILDFLAGS) ./...
go build $(BUILDFLAGS) ./...

$(MANPAGES): %: %.md
$(GOMD2MAN) -in $< -out $@
Expand Down Expand Up @@ -78,7 +78,7 @@ clean:
rm -rf $(MANPAGES)

test:
@GO111MODULE="on" go test $(BUILDFLAGS) -cover ./...
@go test $(BUILDFLAGS) -cover ./...

fmt:
@gofmt -l -s -w $(SOURCE_DIRS)
Expand Down
2 changes: 1 addition & 1 deletion hack/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ -z $(type -P gofmt) ]]; then
fi

echo "Executing go vet"
GO111MODULE="on" go vet -tags="$BUILDTAGS" ./...
go vet -tags="$BUILDTAGS" ./...

echo "Executing gofmt"
OUTPUT=$(gofmt -s -l . | sed -e '/^vendor/d')
Expand Down

0 comments on commit b6b60bf

Please sign in to comment.