4e589e1080
Go module (codeberg.org/mix/selfpost), two command skeletons (panel, selfpost-backup) sharing internal/buildinfo for the -ldflags version stamp, Makefile (static CGO_ENABLED=0 build), AGPL-3.0 LICENSE, README skeleton and .gitattributes forcing LF (container scripts must not get CRLF). Verified on the dev server: go vet clean, make build produces statically linked binaries, version stamping works. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
711 B
Go
28 lines
711 B
Go
// Command panel is the SelfPost control panel. In the finished product this
|
|
// single binary combines several roles (spec 7.1): the HTTP panel server,
|
|
// the journal-milter, the mail.log tailer and the rate-limit checks.
|
|
//
|
|
// This is the Phase 0 skeleton: it only reports its version so the build
|
|
// pipeline (ldflags stamping, docker build) can be wired up end to end.
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"codeberg.org/mix/selfpost/internal/buildinfo"
|
|
)
|
|
|
|
func main() {
|
|
showVersion := flag.Bool("version", false, "print version and exit")
|
|
flag.Parse()
|
|
|
|
if *showVersion {
|
|
fmt.Println(buildinfo.Version)
|
|
return
|
|
}
|
|
|
|
fmt.Fprintf(os.Stdout, "selfpost panel %s (skeleton)\n", buildinfo.Version)
|
|
}
|