mirror of https://github.com/harness/drone.git
[MISC] Hide `pre`/`dev` vars from `version` package (#299)
parent
0d922b5354
commit
2b74349922
2
Makefile
2
Makefile
|
@ -69,7 +69,7 @@ test: generate ## Run the go tests
|
|||
go tool cover -html=coverage.out
|
||||
|
||||
run: dep ## Run the gitness binary from source
|
||||
@go run -race -ldflags="-X github.com/harness/gitness/version.Version=1.0.0" .
|
||||
@go run -race -ldflags=${LDFLAGS} .
|
||||
|
||||
clean-db: ## delete all data from local database
|
||||
psql postgresql://gitness:gitness@localhost:5432/gitness -f scripts/db/cleanup.sql
|
||||
|
|
|
@ -25,18 +25,18 @@ var (
|
|||
minor string
|
||||
// patch is for backwards-compatible bug fixes.
|
||||
patch string
|
||||
// Pre indicates prerelease.
|
||||
Pre = ""
|
||||
// Dev indicates development branch. Releases will be empty string.
|
||||
Dev string
|
||||
// pre indicates prerelease.
|
||||
pre = ""
|
||||
// dev indicates development branch. Releases will be empty string.
|
||||
dev string
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
Version = semver.Version{
|
||||
Major: parseVersionNumber(major),
|
||||
Minor: parseVersionNumber(minor),
|
||||
Patch: parseVersionNumber(patch),
|
||||
PreRelease: semver.PreRelease(Pre),
|
||||
Metadata: Dev,
|
||||
PreRelease: semver.PreRelease(pre),
|
||||
Metadata: dev,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue