File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646.PHONY : ci
4747ci : install-tools test coverage
4848
49+ .PHONY : install
50+ install :
51+ GO111MODULE=on go install \
52+ -trimpath \
53+ -ldflags \
54+ " -X github.com/onflow/flow-cli/build.commit=$( COMMIT) -X github.com/onflow/flow-cli/build.semver=$( VERSION) " \
55+ ./cmd/flow
56+
4957$(BINARY ) :
5058 GO111MODULE=on go build \
5159 -trimpath \
Original file line number Diff line number Diff line change @@ -29,33 +29,33 @@ const undefined = "undefined"
2929
3030// The following variables are injected at build-time using ldflags.
3131var (
32- semver string
33- commit string
32+ semver string
33+ commit string
3434)
3535
3636// Semver returns the semantic version of this build.
3737func Semver () string {
38- return semver
38+ return semver
3939}
4040
4141// Commit returns the commit at which this build was created.
4242func Commit () string {
43- return commit
43+ return commit
4444}
4545
4646// IsDefined determines whether a version string is defined. Inputs should
4747// have been produced from this package.
4848func IsDefined (v string ) bool {
49- return v != undefined
49+ return v != undefined
5050}
5151
5252// If any of the build-time-injected variables are empty at initialization,
5353// mark them as undefined.
5454func init () {
55- if len (semver ) == 0 {
56- semver = undefined
57- }
58- if len (commit ) == 0 {
59- semver = undefined
60- }
61- }
55+ if len (semver ) == 0 {
56+ semver = undefined
57+ }
58+ if len (commit ) == 0 {
59+ commit = undefined
60+ }
61+ }
You can’t perform that action at this time.
0 commit comments