Add selfupdate: replace the running program with the newest Gitea release
CI / test (push) Successful in 1m56s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-10-26 13:57:23 -06:00
1 parent b37b18c40d
commit d1bbd28fb0
4 files changed
+456

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
//go:build !windows
package selfupdate
import (
"os"
"syscall"
)
// restart replaces this process with the new binary, with the same arguments and environment.
func restart(exe string) error {
return syscall.Exec(exe, os.Args, os.Environ())
}