Ship and run the Go binary instead of Node

Releases now carry one archive per architecture with a static awg-control
binary (services and CLI), the built frontend and .env; the installer no
longer installs Node.js or runs npm.

- tools/release/package.sh: CGO-free builds for linux/amd64 and arm64,
  version injected into `awg-control version`; used by both the GitHub and
  Gitea release workflows
- install.sh: architecture check, per-arch archive, /usr/local/bin/awg-ctrl
  is a symlink to the binary, systemd unit without node in PATH, steps
  renumbered 1/6..6/6
- update from a Node install: the old services are stopped through the old
  CLI, then TS sources, node_modules and the old dist are removed; cli.env,
  panel.id and logs stay
- README: one binary, its roles, architecture requirement
This commit is contained in:
2026-10-14 13:27:24 +00:00
parent 5aa0c3a2f5
commit bac230f144
6 changed files with 121 additions and 104 deletions
+5
View File
@@ -14,6 +14,9 @@ import (
"github.com/maeneko/forgetting/internal/ui"
)
// version — из сборки релиза (-ldflags "-X main.version=…").
var version = "dev"
func main() {
// Без аргументов или с командой оператора — CLI (меню, start/stop/…), как прежний awg-ctrl.
if len(os.Args) < 2 {
@@ -21,6 +24,8 @@ func main() {
return
}
switch os.Args[1] {
case "version":
fmt.Println(version)
case "ctrl":
s, err := ctrl.New()
if err != nil {