rm outdated code from makefile since goreleaser was added

This commit is contained in:
techknowlogick 2023-09-10 04:14:38 +00:00
parent f2cf5b7979
commit 33442fd05f
1 changed files with 1 additions and 32 deletions

View File

@ -1,7 +1,4 @@
DIST := dist DIST := dist
export GO111MODULE=on
export CGO_ENABLED=0
GO ?= go GO ?= go
SHASUM ?= shasum -a 256 SHASUM ?= shasum -a 256
@ -17,7 +14,7 @@ else
ifneq ($(DRONE_BRANCH),) ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH)) VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
else else
VERSION ?= master VERSION ?= main
endif endif
TEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') TEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
endif endif
@ -130,34 +127,6 @@ $(EXECUTABLE): $(SOURCES)
build-image: build-image:
docker build --build-arg VERSION=$(TEA_VERSION) -t gitea/tea:$(TEA_VERSION_TAG) . docker build --build-arg VERSION=$(TEA_VERSION) -t gitea/tea:$(TEA_VERSION_TAG) .
.PHONY: release
release: release-dirs install-release-tools release-os release-compress release-check
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/release
.PHONY: release-os
release-os:
CGO_ENABLED=0 $(GO) run github.com/mitchellh/gox@latest -verbose -cgo=false $(GOFLAGS) -osarch='!darwin/386 !darwin/arm' -os="windows linux darwin" -arch="386 amd64 arm arm64" -output="$(DIST)/release/tea-$(VERSION)-{{.OS}}-{{.Arch}}"
.PHONY: release-compress
release-compress: install-release-tools
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run github.com/ulikunitz/xz/cmd/gxz@latest -k -9 $${file}; done;
.PHONY: release-check
release-check: install-release-tools
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "checksumming $${file}" && $(SHASUM) `echo $${file} | sed 's/^..//'` > $${file}.sha256; done;
### tools
install-release-tools:
@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install github.com/mitchellh/gox@latest; \
fi
@hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install github.com/ulikunitz/xz/cmd/gxz@latest; \
fi
install-lint-tools: install-lint-tools:
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install github.com/mgechev/revive@v1.3.2; \ $(GO) install github.com/mgechev/revive@v1.3.2; \