mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 09:58:29 +02:00
contributed container build definition (#350)
as discussed with @noerw on Discord Co-authored-by: Tamás Gérczei <tamas@gerczei.eu> Reviewed-on: https://gitea.com/gitea/tea/pulls/350 Reviewed-by: 6543 <6543@obermui.de> Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Tamás Gérczei <tgerczei@noreply.gitea.io> Co-committed-by: Tamás Gérczei <tgerczei@noreply.gitea.io>
This commit is contained in:

committed by
Lunny Xiao

parent
0bf844018c
commit
195bd2199c
6
Makefile
6
Makefile
@ -38,6 +38,8 @@ else
|
||||
TEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
||||
endif
|
||||
|
||||
TEA_VERSION_TAG ?= $(shell sed 's/+/_/' <<< $(TEA_VERSION))
|
||||
|
||||
LDFLAGS := -X "main.Version=$(TEA_VERSION)" -X "main.Tags=$(TAGS)"
|
||||
|
||||
PACKAGES ?= $(shell $(GO) list ./... | grep -v /vendor/)
|
||||
@ -139,6 +141,10 @@ build: $(EXECUTABLE)
|
||||
$(EXECUTABLE): $(SOURCES)
|
||||
$(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
||||
|
||||
.PHONY: build-image
|
||||
build-image:
|
||||
docker build --build-arg VERSION=$(TEA_VERSION) -t gitea/tea:$(TEA_VERSION_TAG) .
|
||||
|
||||
.PHONY: release
|
||||
release: release-dirs release-os release-compress release-check
|
||||
|
||||
|
Reference in New Issue
Block a user