mirror of
https://github.com/containers/image.git
synced 2025-04-18 19:44:05 +03:00
Stop setting GO111MODULE=on
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>
This commit is contained in:
parent
d847108fb4
commit
b6b60bf5af
6
Makefile
6
Makefile
@ -15,7 +15,7 @@ BUILD_TAGS_DARWIN_CROSS = containers_image_openpgp
|
|||||||
BUILDTAGS = btrfs_noversion libdm_no_deferred_remove
|
BUILDTAGS = btrfs_noversion libdm_no_deferred_remove
|
||||||
BUILDFLAGS := -tags "$(BUILDTAGS)"
|
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)
|
SOURCE_DIRS = $(shell echo $(PACKAGES) | awk 'BEGIN{FS="/"; RS=" "}{print $$4}' | uniq)
|
||||||
|
|
||||||
PREFIX ?= ${DESTDIR}/usr
|
PREFIX ?= ${DESTDIR}/usr
|
||||||
@ -41,7 +41,7 @@ export PATH := $(PATH):${GOBIN}
|
|||||||
all: tools test validate .gitvalidation
|
all: tools test validate .gitvalidation
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GO111MODULE="on" go build $(BUILDFLAGS) ./...
|
go build $(BUILDFLAGS) ./...
|
||||||
|
|
||||||
$(MANPAGES): %: %.md
|
$(MANPAGES): %: %.md
|
||||||
$(GOMD2MAN) -in $< -out $@
|
$(GOMD2MAN) -in $< -out $@
|
||||||
@ -78,7 +78,7 @@ clean:
|
|||||||
rm -rf $(MANPAGES)
|
rm -rf $(MANPAGES)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@GO111MODULE="on" go test $(BUILDFLAGS) -cover ./...
|
@go test $(BUILDFLAGS) -cover ./...
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@gofmt -l -s -w $(SOURCE_DIRS)
|
@gofmt -l -s -w $(SOURCE_DIRS)
|
||||||
|
@ -15,7 +15,7 @@ if [[ -z $(type -P gofmt) ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Executing go vet"
|
echo "Executing go vet"
|
||||||
GO111MODULE="on" go vet -tags="$BUILDTAGS" ./...
|
go vet -tags="$BUILDTAGS" ./...
|
||||||
|
|
||||||
echo "Executing gofmt"
|
echo "Executing gofmt"
|
||||||
OUTPUT=$(gofmt -s -l . | sed -e '/^vendor/d')
|
OUTPUT=$(gofmt -s -l . | sed -e '/^vendor/d')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user