aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/hakurei_current.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-23 15:16:51 +0900
committerOphestra <cat@gensokyo.uk>2026-02-23 17:56:16 +0900
commitae8c365c0f474b5c678701c95795677c20dc22b7 (patch)
tree5e0ecb0de21b2a203b39423adeba7f340d535c90 /internal/rosa/hakurei_current.go
parent485db515f7772178637cd630ca3ac2facd8e7f38 (diff)
internal/rosa/hakurei: optionally use embedded source
This builds hakurei in Rosa OS between releases. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/hakurei_current.go')
-rw-r--r--internal/rosa/hakurei_current.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/internal/rosa/hakurei_current.go b/internal/rosa/hakurei_current.go
new file mode 100644
index 00000000..a6eec7f1
--- /dev/null
+++ b/internal/rosa/hakurei_current.go
@@ -0,0 +1,26 @@
+//go:build current
+
+package rosa
+
+import (
+ _ "embed"
+
+ "hakurei.app/internal/pkg"
+)
+
+const hakureiVersion = "1.0-current"
+
+// hakureiSourceTarball is a compressed tarball of the hakurei source code.
+//
+//go:generate tar -zc -C ../.. --exclude .git --exclude *.tar.gz -f hakurei_current.tar.gz .
+//go:embed hakurei_current.tar.gz
+var hakureiSourceTarball []byte
+
+// hakureiSource is the source code at the time this package is compiled.
+var hakureiSource = pkg.NewTar(pkg.NewFile(
+ "hakurei-current.tar.gz",
+ hakureiSourceTarball,
+), pkg.TarGzip)
+
+// hakureiPatches are patches applied against the compile-time source tree.
+var hakureiPatches [][2]string