// Command devvm-cosign is the co-signer of devvm's releases and bases: a // program of its own, on a machine of the maintainer's, that rebuilds // each build CI hands over, signs it only when its own build matches, and // makes and publishes its release once two of the three keys signed it. // It reads its keys from systemd's credentials. Its code is in // internal/cosign; packaging/cosign has its systemd units and install // script. package main import ( "context" "os" "os/signal" "syscall" "github.com/devvmhq/devvm/internal/cosign" ) func main() { // The run's own context, ended by systemd's stop (TERM) or Ctrl+C, // which ends a build and its container through release.sh's traps. ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) code := cosign.Main(ctx, os.Args[1:], cosign.Env{Credentials: os.Getenv("CREDENTIALS_DIRECTORY")}, os.Stderr) stop() os.Exit(code) }