Added precompiled binaries

This commit is contained in:
Darius klein 2025-07-20 14:06:12 +02:00
parent 3ca7e8588a
commit 8be8069ec0
6 changed files with 13 additions and 5 deletions

2
compileServices.sh Executable file
View File

@ -0,0 +1,2 @@
GOOS=windows go generate ./services
GOOS=linux go generate ./services

View File

@ -16,11 +16,11 @@ import (
func main() {
conf, err := common.ReadConfig()
if err != nil {
log.Fatal(err)
slog.Error(err.Error())
} else {
setLogLevel(conf)
}
setLogLevel(conf)
app := &cli.Command{
Name: "KleinCommand",
Usage: "CLI tool for internal use",

BIN
services/exampleService Executable file

Binary file not shown.

BIN
services/exampleService.exe Executable file

Binary file not shown.

View File

@ -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

View File

@ -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
}