-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: assign version using release-please (#654)
This PR changes version number output to the following: ### Release ``` $ hcloud version hcloud 1.23.4 ``` ### goreleaser --snapshot ``` $ hcloud version hcloud 1.23.4-dev+<short commit id> ``` ### go build/go install ``` $ hcloud version hcloud 1.23.4-dev ``` Closes #636 --------- Co-authored-by: jo <ljonas@riseup.net>
- Loading branch information
Showing
3 changed files
with
28 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
package version | ||
|
||
// Version is set via compiler flags (see goreleaser config) | ||
var Version = "unknown" | ||
var ( | ||
// version is a semver version (https://semver.org). | ||
version = "1.41.1" // x-release-please-version | ||
|
||
// versionPrerelease is a semver version pre-release identifier (https://semver.org). | ||
// | ||
// For final releases, we set this to an empty string. | ||
versionPrerelease = "dev" | ||
|
||
// Version of the hcloud CLI. | ||
Version = func() string { | ||
if versionPrerelease != "" { | ||
return version + "-" + versionPrerelease | ||
} | ||
return version | ||
}() | ||
) |