Skip to content

Commit b54c3a4

Browse files
author
Loïc Dachary
committed
implementation: publish forgejo- binaries instead of gitea-
Signed-off-by: Loïc Dachary <[email protected]>
1 parent 6992e72 commit b54c3a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ifneq ($(DRONE_TAG),)
8383
GITEA_VERSION ?= $(VERSION)
8484
else
8585
ifneq ($(DRONE_BRANCH),)
86-
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
86+
VERSION ?= $(shell echo $(DRONE_BRANCH) | sed -e 's|v\([0-9.][0-9.]*\)/.*|\1|')
8787
else
8888
VERSION ?= main
8989
endif
@@ -750,7 +750,7 @@ endif
750750

751751
.PHONY: release-linux
752752
release-linux: | $(DIST_DIRS)
753-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
753+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out forgejo-$(VERSION) .
754754
ifeq ($(CI),true)
755755
cp /build/* $(DIST)/binaries
756756
endif
@@ -780,8 +780,8 @@ release-sources: | $(DIST_DIRS)
780780
# bsdtar needs a ^ to prevent matching subdirectories
781781
$(eval EXCL := --exclude=$(shell tar --help | grep -q bsdtar && echo "^")./)
782782
# use transform to a add a release-folder prefix; in bsdtar the transform parameter equivalent is -s
783-
$(eval TRANSFORM := $(shell tar --help | grep -q bsdtar && echo "-s '/^./gitea-src-$(VERSION)/'" || echo "--transform 's|^./|gitea-src-$(VERSION)/|'"))
784-
tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) $(TRANSFORM) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
783+
$(eval TRANSFORM := $(shell tar --help | grep -q bsdtar && echo "-s '/^./forgejo-src-$(VERSION)/'" || echo "--transform 's|^./|forgejo-src-$(VERSION)/|'"))
784+
tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) $(TRANSFORM) -czf $(DIST)/release/forgejo-src-$(VERSION).tar.gz .
785785
rm -f $(STORED_VERSION_FILE)
786786

787787
.PHONY: release-docs

0 commit comments

Comments
 (0)