Fix build scripts (and static file embed)
This commit is contained in:
parent
8c56407031
commit
0f055eacb8
3 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
4
Makefile
4
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};)
|
||||
|
||||
|
|
|
@ -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",
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue