mirror of
https://github.com/Jguer/yay
synced 2024-08-31 05:39:29 +00:00
Bump version to 9.3.3. Fix issues with make build calling make vendor
This commit is contained in:
parent
769aee728a
commit
fdcfeba902
21
Makefile
21
Makefile
|
@ -9,16 +9,16 @@ PREFIX := /usr/local
|
||||||
|
|
||||||
MAJORVERSION := 9
|
MAJORVERSION := 9
|
||||||
MINORVERSION := 3
|
MINORVERSION := 3
|
||||||
PATCHVERSION := 2
|
PATCHVERSION := 3
|
||||||
VERSION ?= ${MAJORVERSION}.${MINORVERSION}.${PATCHVERSION}
|
VERSION ?= ${MAJORVERSION}.${MINORVERSION}.${PATCHVERSION}
|
||||||
|
|
||||||
GOFLAGS := -v
|
GOFLAGS := -v -mod=vendor
|
||||||
EXTRA_GOFLAGS ?=
|
EXTRA_GOFLAGS ?=
|
||||||
LDFLAGS := $(LDFLAGS) -X "main.version=${VERSION}"
|
LDFLAGS := $(LDFLAGS) -X "main.version=${VERSION}"
|
||||||
|
|
||||||
RELEASE_DIR := ${PKGNAME}_${VERSION}_${ARCH}
|
RELEASE_DIR := ${PKGNAME}_${VERSION}_${ARCH}
|
||||||
PACKAGE := $(RELEASE_DIR).tar.gz
|
PACKAGE := $(RELEASE_DIR).tar.gz
|
||||||
SOURCES ?= $(shell find . -path ./vendor -prune -o -name "*.go" -type f)
|
SOURCES ?= $(shell find . -name "*.go" -type f ! -path "./vendor/*")
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: | clean release
|
all: | clean release
|
||||||
|
@ -28,14 +28,14 @@ default: build
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(GO) clean -i ./...
|
$(GO) clean $(GOFLAGS) -i ./...
|
||||||
rm -rf $(BIN) $(PKGNAME)_$(VERSION)_*
|
rm -rf $(BIN) $(PKGNAME)_$(VERSION)_*
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: test-vendor
|
test:
|
||||||
$(GO) vet ./...
|
$(GO) vet $(GOFLAGS) ./...
|
||||||
@test -z "$$(gofmt -l *.go)" || (echo "Files need to be linted. Use make fmt" && false)
|
@test -z "$$(gofmt -l *.go)" || (echo "Files need to be linted. Use make fmt" && false)
|
||||||
$(GO) test -mod=vendor --race -covermode=atomic -v . ./pkg/...
|
$(GO) test $(GOFLAGS) --race -covermode=atomic . ./pkg/...
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(BIN)
|
build: $(BIN)
|
||||||
|
@ -44,7 +44,7 @@ build: $(BIN)
|
||||||
release: $(PACKAGE)
|
release: $(PACKAGE)
|
||||||
|
|
||||||
$(BIN): $(SOURCES)
|
$(BIN): $(SOURCES)
|
||||||
$(GO) build -mod=vendor -ldflags '-s -w $(LDFLAGS)' $(GOFLAGS) $(EXTRA_GOFLAGS) -o $@
|
$(GO) build $(GOFLAGS) -ldflags '-s -w $(LDFLAGS)' $(EXTRA_GOFLAGS) -o $@
|
||||||
|
|
||||||
$(RELEASE_DIR):
|
$(RELEASE_DIR):
|
||||||
mkdir $(RELEASE_DIR)
|
mkdir $(RELEASE_DIR)
|
||||||
|
@ -82,6 +82,11 @@ test-vendor: vendor
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
.PHONY: fmt
|
||||||
|
fmt:
|
||||||
|
#go fmt -mod=vendor $(GOFILES) ./... Doesn't work yet but will be supported soon
|
||||||
|
gofmt -s -w $(SOURCES)
|
||||||
|
|
||||||
.PHONY: vendor
|
.PHONY: vendor
|
||||||
vendor:
|
vendor:
|
||||||
$(GO) mod tidy && $(GO) mod vendor
|
$(GO) mod tidy && $(GO) mod vendor
|
||||||
|
|
Loading…
Reference in a new issue