mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-04-27 11:30:52 +00:00
- add new suite to the pipeline and fix Earthly to run tests - read configuration from file - the "kcrypt" section is our configuration now - move configuration logic in `kcrypt` repository Part of #399 Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com> Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
31 lines
480 B
Go
31 lines
480 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/kairos-io/go-tpm"
|
|
"github.com/kairos-io/kairos-challenger/cmd/discovery/client"
|
|
"github.com/kairos-io/kcrypt/pkg/bus"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) >= 2 && bus.IsEventDefined(os.Args[1]) {
|
|
c, err := client.NewClient()
|
|
checkErr(err)
|
|
checkErr(c.Start())
|
|
return
|
|
}
|
|
|
|
pubhash, err := tpm.GetPubHash()
|
|
checkErr(err)
|
|
fmt.Print(pubhash)
|
|
}
|
|
|
|
func checkErr(err error) {
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|