Version 1.0.0, release build script
- version.go/version.txt, --version flag, version in the help title - build.sh builds static binaries for macOS and Linux into ./bin - make build/install inject version.txt, make dist runs build.sh - README: binary downloads; development docs: release process Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
156bb18c91
commit
e5750ef24b
9 files changed
+162
-9
No files matched your search
@@ -21,12 +21,17 @@ func main() {
|
||||
offline := flag.Bool("offline", false, "do not run ghostty; use the built-in option list")
|
||||
printPath := flag.Bool("print-path", false, "print the config file that would be edited and exit")
|
||||
noReload := flag.Bool("no-reload", false, "do not ask Ghostty to reload its configuration after saving")
|
||||
showVersion := flag.Bool("version", false, "print the version and exit")
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [flags] [config-file]\n\n", filepath.Base(os.Args[0]))
|
||||
fmt.Fprintln(flag.CommandLine.Output(), "A terminal editor for the Ghostty configuration. Flags:")
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "A terminal editor for the Ghostty configuration (version %s). Flags:\n", Version)
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
flag.Parse()
|
||||
if *showVersion {
|
||||
fmt.Println("ghosttyconf", Version)
|
||||
return
|
||||
}
|
||||
if flag.NArg() > 1 {
|
||||
flag.Usage()
|
||||
os.Exit(2)
|
||||
@@ -79,6 +84,7 @@ func run(path, ghosttyBin string, offline, autoReload bool) error {
|
||||
|
||||
app := ui.New(sch, gh, file)
|
||||
app.SetAutoReload(autoReload)
|
||||
app.SetVersion(Version)
|
||||
p := tea.NewProgram(app, tea.WithAltScreen(), tea.WithMouseCellMotion())
|
||||
defer ui.RestoreTerminal()
|
||||
_, err = p.Run()
|
||||
|
||||
Reference in new issue
Block a user