From 390faa0cf752c363d1ac82e9fb7ca58ef8df3c2e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 10 Aug 2025 10:04:30 +0800 Subject: Makefile: Remove source tarball generation --- Makefile | 8 ++------ forged/internal/embed/.gitignore | 1 - forged/internal/embed/embed.go | 4 ++-- forged/templates/_footer.tmpl | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 65d6b07..b606a12 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ CFLAGS = -Wall -Wextra -pedantic -std=c99 -D_GNU_SOURCE VERSION = $(shell git describe --tags --always --dirty) SOURCE_FILES = $(shell git ls-files) -EMBED = git2d/git2d hookc/hookc source.tar.gz $(wildcard LICENSE*) $(wildcard forged/static/*) $(wildcard forged/templates/*) +EMBED = git2d/git2d hookc/hookc $(wildcard LICENSE*) $(wildcard forged/static/*) $(wildcard forged/templates/*) EMBED_ = $(EMBED:%=forged/internal/embed/%) forge: $(EMBED_) $(SOURCE_FILES) @@ -27,11 +27,7 @@ git2d/git2d: $(wildcard git2d/*.c) $(CC) $(CFLAGS) -o git2d/git2d $^ $(shell pkg-config --cflags --libs libgit2) -lpthread clean: - rm -rf forge utils/colb hookc/hookc git2d/git2d source.tar.gz */*.o - -source.tar.gz: $(SOURCE_FILES) - rm -f source.tar.gz - git ls-files -z | xargs -0 tar -czf source.tar.gz + rm -rf forge utils/colb hookc/hookc git2d/git2d */*.o forged/internal/embed/%: % @mkdir -p $(shell dirname $@) diff --git a/forged/internal/embed/.gitignore b/forged/internal/embed/.gitignore index e8708b1..36bd410 100644 --- a/forged/internal/embed/.gitignore +++ b/forged/internal/embed/.gitignore @@ -1,4 +1,3 @@ -/source.tar.gz /hookc/hookc /git2d/git2d /static diff --git a/forged/internal/embed/embed.go b/forged/internal/embed/embed.go index 1f0dcdf..f731538 100644 --- a/forged/internal/embed/embed.go +++ b/forged/internal/embed/embed.go @@ -6,10 +6,10 @@ package embed import "embed" -// Source contains the licenses and source tarballs collected at build time. +// Source contains the licenses collected at build time. // It is intended to be served to the user. // -//go:embed LICENSE* source.tar.gz +//go:embed LICENSE* var Source embed.FS // Resources contains the templates and static files used by the web interface, diff --git a/forged/templates/_footer.tmpl b/forged/templates/_footer.tmpl index f71ea3e..22a3958 100644 --- a/forged/templates/_footer.tmpl +++ b/forged/templates/_footer.tmpl @@ -5,8 +5,7 @@ {{- define "footer" -}} Lindenii Forge {{ .global.forge_version }} -(source, -upstream, +(upstream, license, support) {{- end -}} -- cgit v1.2.3