All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m5s
Add internal/updater package with UpdateService that queries the Gitea generic-package API for newer releases, downloads the installer with SHA256 verification, and launches it to apply the update. Includes semver comparison (CompareVersions) and comprehensive test coverage with httptest-based mock servers. Wire UpdateService into WraithApp (app.go accepts version param) and register as a Wails service in main.go. Frontend StatusBar shows a blue pill notification when an update is available; SettingsModal About section displays the current version and a "Check for Updates" button with idle/checking/found/up-to-date/error states. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
57 lines
1.3 KiB
Go
57 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
"log"
|
|
"log/slog"
|
|
|
|
wraithapp "github.com/vstockwell/wraith/internal/app"
|
|
"github.com/wailsapp/wails/v3/pkg/application"
|
|
)
|
|
|
|
// version is set at build time via -ldflags "-X main.version=..."
|
|
var version = "dev"
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
slog.Info("starting Wraith")
|
|
|
|
wraith, err := wraithapp.New(version)
|
|
if err != nil {
|
|
log.Fatalf("failed to initialize: %v", err)
|
|
}
|
|
|
|
app := application.New(application.Options{
|
|
Name: "Wraith",
|
|
Description: "SSH + RDP + SFTP Desktop Client",
|
|
Services: []application.Service{
|
|
application.NewService(wraith),
|
|
application.NewService(wraith.Connections),
|
|
application.NewService(wraith.Themes),
|
|
application.NewService(wraith.Settings),
|
|
application.NewService(wraith.SSH),
|
|
application.NewService(wraith.SFTP),
|
|
application.NewService(wraith.RDP),
|
|
application.NewService(wraith.AI),
|
|
application.NewService(wraith.Updater),
|
|
},
|
|
Assets: application.AssetOptions{
|
|
Handler: application.BundledAssetFileServer(assets),
|
|
},
|
|
})
|
|
|
|
app.Window.NewWithOptions(application.WebviewWindowOptions{
|
|
Title: "Wraith",
|
|
Width: 1400,
|
|
Height: 900,
|
|
URL: "/",
|
|
BackgroundColour: application.NewRGBA(13, 17, 23, 255),
|
|
})
|
|
|
|
if err := app.Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|