-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cbbcda
commit 2cc715c
Showing
9 changed files
with
62 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Package revision defines variables that will be populated with values from | ||
// the Makefile at build time via LDFLAGS. | ||
package revision | ||
|
||
var ( | ||
// AppVersion is the semver for this version of the client, or | ||
// "v0.0.0-unknown". Set by `make release`. | ||
AppVersion string | ||
|
||
// GitCommit is the short git SHA associated with this build, or | ||
// "unknown". Set by `make release`. | ||
GitCommit string | ||
|
||
// GoVersion is the output of `go version` associated with this build, or | ||
// "go version unknown". Set by `make release`. | ||
GoVersion string | ||
) | ||
|
||
// None is the AppVersion string for local (unversioned) builds. | ||
const None = "v0.0.0-unknown" | ||
|
||
func init() { | ||
if AppVersion == "" { | ||
AppVersion = None | ||
} | ||
if GitCommit == "" { | ||
GitCommit = "unknown" | ||
} | ||
if GoVersion == "" { | ||
GoVersion = "go version unknown" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package useragent | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/fastly/cli/pkg/revision" | ||
) | ||
|
||
// Name is the user agent which we report in all HTTP requests. | ||
var Name = fmt.Sprintf("%s/%s", "FastlyCLI", revision.AppVersion) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters