Added precompiled binaries
This commit is contained in:
parent
3ca7e8588a
commit
8be8069ec0
2
compileServices.sh
Executable file
2
compileServices.sh
Executable file
@ -0,0 +1,2 @@
|
||||
GOOS=windows go generate ./services
|
||||
GOOS=linux go generate ./services
|
||||
6
main.go
6
main.go
@ -16,10 +16,10 @@ import (
|
||||
func main() {
|
||||
conf, err := common.ReadConfig()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
slog.Error(err.Error())
|
||||
} else {
|
||||
setLogLevel(conf)
|
||||
}
|
||||
|
||||
app := &cli.Command{
|
||||
Name: "KleinCommand",
|
||||
|
||||
BIN
services/exampleService
Executable file
BIN
services/exampleService
Executable file
Binary file not shown.
BIN
services/exampleService.exe
Executable file
BIN
services/exampleService.exe
Executable file
Binary file not shown.
@ -4,7 +4,12 @@ package services
|
||||
|
||||
//go:generate go build ./example
|
||||
|
||||
import _ "embed"
|
||||
import (
|
||||
_ "embed"
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
//go:embed exampleService
|
||||
var exampleService []byte
|
||||
|
||||
@ -15,7 +15,8 @@ import (
|
||||
var exampleService []byte
|
||||
|
||||
func runService(name string, file []byte) error {
|
||||
tempFile, err := os.CreateTemp("", name)
|
||||
executableName := name + ".exe"
|
||||
tempFile, err := os.CreateTemp("", executableName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user