mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: add site flag to buildinfo (#14868)
This commit is contained in:
@@ -24,6 +24,9 @@ var (
|
||||
// Updated by buildinfo_slim.go on start.
|
||||
slim bool
|
||||
|
||||
// Updated by buildinfo_site.go on start.
|
||||
site bool
|
||||
|
||||
// Injected with ldflags at build, see scripts/build_go.sh
|
||||
tag string
|
||||
agpl string // either "true" or "false", ldflags does not support bools
|
||||
@@ -95,6 +98,11 @@ func IsSlim() bool {
|
||||
return slim
|
||||
}
|
||||
|
||||
// HasSite returns true if the frontend is embedded in the build.
|
||||
func HasSite() bool {
|
||||
return site
|
||||
}
|
||||
|
||||
// IsAGPL returns true if this is an AGPL build.
|
||||
func IsAGPL() bool {
|
||||
return strings.Contains(agpl, "t")
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
//go:build embed
|
||||
|
||||
package buildinfo
|
||||
|
||||
func init() {
|
||||
site = true
|
||||
}
|
||||
Reference in New Issue
Block a user