git-lfs/git-lfs.go
Sebastian Schuberth a759a2fd05 Use goversioninfo instead of windres to embed Windows resources
windres is not always present whereas goversioninfo is easy to install.

This also fixes the generation of resource.syso to be part of the
standard build script instead of only the AppVeyor CI build.

Finally, adapt update-version.sh to patch versioninfo.json.
2016-12-15 12:27:47 +01:00

38 lines
603 B
Go

//go:generate goversioninfo -icon=script/windows-installer/git-lfs-logo.ico
package main
import (
"fmt"
"os"
"os/signal"
"sync"
"syscall"
"github.com/git-lfs/git-lfs/commands"
)
func main() {
c := make(chan os.Signal)
signal.Notify(c, os.Interrupt, os.Kill)
var once sync.Once
go func() {
for {
sig := <-c
once.Do(commands.Cleanup)
fmt.Fprintf(os.Stderr, "\nExiting because of %q signal.\n", sig)
exitCode := 1
if sysSig, ok := sig.(syscall.Signal); ok {
exitCode = int(sysSig)
}
os.Exit(exitCode + 128)
}
}()
commands.Run()
once.Do(commands.Cleanup)
}