Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix build scripts (and static file embed)

Kailash Nadh0f055eacb870
diff --git a/.goreleaser.yml b/.goreleaser.yml
index ff6b1795..55d3bc01 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -9,6 +9,7 @@ before:
builds:
- binary: listmonk
+ main: ./cmd
goos:
- windows
- darwin
@@ -16,7 +17,7 @@ builds:
goarch:
- amd64
ldflags:
- - -s -w -X "main.buildString={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})"
+ - -s -w -X "main.buildString={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})" -X "main.versionString={{ .Tag }}"
hooks:
# stuff executables with static assets.
@@ -26,8 +27,8 @@ archives:
- format: tar.gz
files:
- README.md
- - INSTALL.md
- LICENSE
+
dockers:
-
goos: linux
diff --git a/Makefile b/Makefile
index 032ca754..c5dd205c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ STATIC := config.toml.sample \
schema.sql queries.sql \
static/public:/public \
static/email-templates \
- frontend/dist:/frontend \
+ frontend/dist/favicon.png:/frontend/favicon.png \
frontend/dist/frontend:/frontend
# Dependencies.
@@ -49,5 +49,5 @@ dist: build build-frontend
# release builds for cross-build targets.
.PHONY: pack-releases
pack-releases:
- $(foreach var,$(RELEASE_BUILDS),stuffbin -a stuff -in ${var} -out ${var} ${STATIC} $(var);)
+ $(foreach var,$(RELEASE_BUILDS),stuffbin -a stuff -in ${var} -out ${var} ${STATIC};)
diff --git a/cmd/init.go b/cmd/init.go
index 651a3a28..ca358c0a 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -126,7 +126,7 @@ func initFS(staticDir string) stuffbin.FileSystem {
// The frontend app's static assets are aliased to /frontend
// so that they are accessible at /frontend/js/* etc.
// Alias all files inside dist/ and dist/frontend to frontend/*.
- "frontend/dist/:/frontend",
+ "frontend/dist/favicon.png:/frontend/favicon.png",
"frontend/dist/frontend:/frontend",
}