mirror of
https://github.com/dragonheim/gagent.git
synced 2025-01-18 02:36:27 -08:00
Fixing a compliation error and possibly versioning.
Some checks failed
G'Agent Scan, Build, and Test / scan (push) Successful in 1m44s
G'Agent Scan, Build, and Test / build_simple (push) Failing after 1m16s
G'Agent Scan, Build, and Test / test_simple (push) Has been skipped
G'Agent Scan, Build, and Test / build_image (push) Has been skipped
Some checks failed
G'Agent Scan, Build, and Test / scan (push) Successful in 1m44s
G'Agent Scan, Build, and Test / build_simple (push) Failing after 1m16s
G'Agent Scan, Build, and Test / test_simple (push) Has been skipped
G'Agent Scan, Build, and Test / build_image (push) Has been skipped
This commit is contained in:
parent
df07f6be28
commit
91c591e22f
2 changed files with 6 additions and 6 deletions
|
@ -36,7 +36,7 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: go build -o test_artifact cmd/hello/main.go
|
||||
- run: go build -o test_artifact cmd/gagent/main.go
|
||||
- run: ./test_artifact --version
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
|
@ -50,7 +50,7 @@ jobs:
|
|||
container:
|
||||
image: dragonheim/golang:latest
|
||||
steps:
|
||||
- run: apk add --no-cache nodejs npm
|
||||
- run: apk add --no-cache zeromq-dev nodejs npm
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: test_artifact
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
debug "runtime/debug"
|
||||
flag "flag"
|
||||
log "log"
|
||||
http "net/http"
|
||||
os "os"
|
||||
debug "runtime/debug"
|
||||
strconv "strconv"
|
||||
sync "sync"
|
||||
|
||||
|
@ -31,7 +31,6 @@ import (
|
|||
promhttp "github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
uuid "github.com/jakehl/goid"
|
||||
|
||||
//versioninfo "github.com/carlmjohnson/versioninfo"
|
||||
)
|
||||
|
||||
|
@ -152,7 +151,8 @@ func init() {
|
|||
/*
|
||||
* Initialize the configuration
|
||||
*/
|
||||
config.Version, err = debug.ReadBuildInfo()
|
||||
buildInfo, _ := debug.ReadBuildInfo()
|
||||
config.Version = buildInfo.Main.Version
|
||||
// config.Version = versioninfo.Version
|
||||
|
||||
config.File = cfg.ConfigFile
|
||||
|
@ -228,7 +228,7 @@ func init() {
|
|||
|
||||
usage += "Options:\n"
|
||||
usage += " -h, --help -- Show this help screen and exit\n"
|
||||
usage += " -v, -version -- Show version and exit\n"
|
||||
usage += " -v, --version -- Show version and exit\n"
|
||||
usage += " --config=<config> -- [default: /etc/gagent/gagent.hcl]\n"
|
||||
usage += " --agent=<file> -- filename of the agent to be uploaded to the G'Agent network. Required in push mode\n"
|
||||
usage += "\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue