@@ -251,6 +251,16 @@ func (Build) DarwinARM64() error {
251251 return buildBackend (newBuildConfig ("darwin" , "arm64" ))
252252}
253253
254+ // FreeBSD builds the back-end plugin for FreeBSD on AMD64.
255+ func (Build ) FreeBSD () error {
256+ return buildBackend (newBuildConfig ("freebsd" , "amd64" ))
257+ }
258+
259+ // FreeBSDARM64 builds the back-end plugin for FreeBSD on ARM64.
260+ func (Build ) FreeBSDARM64 () error {
261+ return buildBackend (newBuildConfig ("freebsd" , "arm" ))
262+ }
263+
254264// Custom allows customizable back-end plugin builds for the provided os and arch.
255265// Note: Cutomized builds are not officially supported by Grafana, so this option is intended for developers who need
256266// to create their own custom build targets.
@@ -329,6 +339,20 @@ func (Build) DebugWindowsAMD64() error {
329339 return buildBackend (cfg )
330340}
331341
342+ // DebugFreeBSDAMD64 builds the debug version targeted for FreeBSD on AMD64.
343+ func (Build ) DebugFreeBSDAMD64 () error {
344+ cfg := newBuildConfig ("freebsd" , "amd64" )
345+ cfg .EnableDebug = true
346+ return buildBackend (cfg )
347+ }
348+
349+ // DebugFreeBSDARM64 builds the debug version targeted for FreeBSD on ARM64.
350+ func (Build ) DebugFreeBSDARM64 () error {
351+ cfg := newBuildConfig ("freebsd" , "arm64" )
352+ cfg .EnableDebug = true
353+ return buildBackend (cfg )
354+ }
355+
332356// Backend build a production build for the current platform
333357func (Build ) Backend () error {
334358 // The M1 platform detection is kinda flakey, so we will just build both
@@ -346,7 +370,8 @@ func (Build) Backend() error {
346370// BuildAll builds production executables for all supported platforms.
347371func BuildAll () { //revive:disable-line
348372 b := Build {}
349- mg .Deps (b .Linux , b .Windows , b .Darwin , b .DarwinARM64 , b .LinuxARM64 , b .LinuxARM )
373+ mg .Deps (b .Linux , b .Windows , b .Darwin , b .DarwinARM64 , b .LinuxARM64 , b .LinuxARM ,
374+ b .FreeBSD , b .FreeBSDARM64 )
350375}
351376
352377//go:embed tmpl/*
0 commit comments