Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in version linking #159

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/v0.0.26/version-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
- type: FIX
description: Fix a bug in version linking which caused the version to be 'dev' on release.
issueLink: https://github.com/solo-io/wasme/issues/158
4 changes: 1 addition & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
# make serve-site -B



# remove the "v" prefix
VERSION ?= $(shell echo $(TAGGED_VERSION) | cut -c 2-)

# GCLOUD_PROJECT_ID Passed by cloudbuild upload-release-assets
GCLOUD_PROJECT_ID := $(GCLOUD_PROJECT_ID)
GCLOUD_PROJECT_ID ?= "solo-public"

GCR_REPO_PREFIX ?= gcr.io/$(GCLOUD_PROJECT_ID)
### REPLACE with product name
Expand Down
13 changes: 10 additions & 3 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
package version

var DevVersion = "dev"

// This will be set by the linker on release builds
var Version = DevVersion
var (
Version string
DevVersion = "dev"
)

func init() {
if Version == "" {
Version = DevVersion
}
}