b39d1d0302
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>
27 lines
680 B
Go
27 lines
680 B
Go
// Command selfpost-backup produces (and helps restore) the full persistent-state
|
|
// archive from inside the container, invoked via `docker exec` for scripted/cron
|
|
// backups — the CLI equivalent of the panel's backup button (spec 7.5.A, 11.6).
|
|
//
|
|
// This is the Phase 0 skeleton: it only reports its version. The actual archive
|
|
// logic lands in Phase 9.
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
|
|
"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.Printf("selfpost-backup %s (skeleton)\n", buildinfo.Version)
|
|
}
|