feat: contact form backend for linux and freebsd servers
Test / test (push) Successful in 2m1s
Release / gates (push) Successful in 1m57s
Release / build (amd64, freebsd) (push) Successful in 1m26s
Release / build (amd64, linux) (push) Successful in 1m30s
Release / build (arm64, freebsd) (push) Successful in 1m28s
Release / build (arm64, linux) (push) Successful in 1m49s
Release / build (loong64, linux) (push) Successful in 1m30s
Release / build (riscv64, linux) (push) Successful in 1m29s
Release / release (push) Successful in 41s
Test / test (push) Successful in 2m1s
Release / gates (push) Successful in 1m57s
Release / build (amd64, freebsd) (push) Successful in 1m26s
Release / build (amd64, linux) (push) Successful in 1m30s
Release / build (arm64, freebsd) (push) Successful in 1m28s
Release / build (arm64, linux) (push) Successful in 1m49s
Release / build (loong64, linux) (push) Successful in 1m30s
Release / build (riscv64, linux) (push) Successful in 1m29s
Release / release (push) Successful in 41s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//go:build linux || freebsd
|
||||
|
||||
// Package version exposes the nuntius release identity.
|
||||
package version
|
||||
|
||||
import "runtime/debug"
|
||||
|
||||
// Name is the program name reported by `--version` and in log lines.
|
||||
const Name = "nuntius"
|
||||
|
||||
// Version reports the release the toolchain recorded for this build: the
|
||||
// tag when the checkout is at one, a pseudo-version naming the commit
|
||||
// otherwise, and (devel) outside version control. Nothing writes a version
|
||||
// number, so the recorded value cannot go stale, and a dirty tree reports
|
||||
// +dirty honestly.
|
||||
func Version() string {
|
||||
bi, ok := debug.ReadBuildInfo()
|
||||
if !ok || bi.Main.Version == "" {
|
||||
return "(devel)"
|
||||
}
|
||||
return bi.Main.Version
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//go:build linux || freebsd
|
||||
|
||||
package version
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestName(t *testing.T) {
|
||||
if Name != "nuntius" {
|
||||
t.Errorf("Name = %q, want %q", Name, "nuntius")
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersion(t *testing.T) {
|
||||
// The recorded version is never empty: at a tag it is the tag, elsewhere
|
||||
// a pseudo-version, and (devel) outside version control.
|
||||
if Version() == "" {
|
||||
t.Error("Version must not be empty")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user