■ ■ ■ ■ ■ ■
internal/server/webserver/buildmanager.go
| skipped 9 lines |
10 | 10 | | "os/exec" |
11 | 11 | | "path/filepath" |
12 | 12 | | "runtime" |
| 13 | + | "strings" |
13 | 14 | | "sync" |
14 | 15 | | |
15 | 16 | | "github.com/NHAS/reverse_ssh/internal" |
| skipped 96 lines |
112 | 113 | | |
113 | 114 | | f.Path = filepath.Join(cachePath, filename) |
114 | 115 | | f.FileType = "executable" |
115 | | - | f.Version = internal.Version + " (guess)" |
| 116 | + | f.Version = internal.Version + "_guess" |
116 | 117 | | |
117 | 118 | | repoVersion, err := exec.Command("git", "describe", "--tags").CombinedOutput() |
118 | 119 | | if err == nil { |
| skipped 35 lines |
154 | 155 | | return "", err |
155 | 156 | | } |
156 | 157 | | |
157 | | - | buildArguments = append(buildArguments, fmt.Sprintf("-ldflags=-s -w -X main.destination=%s -X main.fingerprint=%s -X github.com/NHAS/reverse_ssh/internal.Version=%s", suppliedConnectBackAdress, fingerprint, f.Version)) |
| 158 | + | buildArguments = append(buildArguments, fmt.Sprintf("-ldflags=-s -w -X main.destination=%s -X main.fingerprint=%s -X github.com/NHAS/reverse_ssh/internal.Version=%s", suppliedConnectBackAdress, fingerprint, strings.TrimSpace(f.Version))) |
158 | 159 | | buildArguments = append(buildArguments, "-o", f.Path, filepath.Join(projectRoot, "/cmd/client")) |
159 | 160 | | |
160 | 161 | | cmd := exec.Command(buildTool, buildArguments...) |
| skipped 201 lines |