aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/embed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--forged/internal/embed/.gitignore7
-rw-r--r--forged/internal/embed/embed.go20
2 files changed, 27 insertions, 0 deletions
diff --git a/forged/internal/embed/.gitignore b/forged/internal/embed/.gitignore
new file mode 100644
index 0000000..e8708b1
--- /dev/null
+++ b/forged/internal/embed/.gitignore
@@ -0,0 +1,7 @@
+/source.tar.gz
+/hookc/hookc
+/git2d/git2d
+/static
+/templates
+/LICENSE*
+/forged
diff --git a/forged/internal/embed/embed.go b/forged/internal/embed/embed.go
new file mode 100644
index 0000000..1f0dcdf
--- /dev/null
+++ b/forged/internal/embed/embed.go
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
+
+// Package embed provides embedded filesystems created in build-time.
+package embed
+
+import "embed"
+
+// Source contains the licenses and source tarballs collected at build time.
+// It is intended to be served to the user.
+//
+//go:embed LICENSE* source.tar.gz
+var Source embed.FS
+
+// Resources contains the templates and static files used by the web interface,
+// as well as the git backend daemon and the hookc helper.
+//
+//go:embed forged/templates/* forged/static/*
+//go:embed hookc/hookc git2d/git2d
+var Resources embed.FS