Skip to content

Commit

Permalink
Merge pull request #44 from medyagh/versionmakefile
Browse files Browse the repository at this point in the history
move version to go src for go install
  • Loading branch information
medyagh authored Mar 2, 2023
2 parents d7756ce + 325ec9d commit 95640cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ BINARY=/out/gopogh
GIT_TAG=`git describe --tags`
COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)
BUILD ?= $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}")
LDFLAGS :=-X github.com/medyagh/gopogh/pkg/report.Build=${BUILD} -X github.com/medyagh/gopogh/pkg/report.Version=${GIT_TAG}
LDFLAGS :=-X github.com/medyagh/gopogh/pkg/report.Build=${BUILD}
VERSION := v0.0.14

.PHONY: build
build: out/gopogh
Expand Down Expand Up @@ -61,3 +62,8 @@ test-in-docker:
.PHONY: azure_blob_connection_string
azure_blob_connection_string: ## set this env export AZURE_STORAGE_CONNECTION_STRING=$(az storage account show-connection-string -n $AZ_STORAGE -g $AZ_RG --query connectionString -o tsv)
az storage account show-connection-string -n ${AZ_STORAGE} -g ${AZ_RG} --query connectionString -o tsv


.PHONY: bump-version
bump-version:
sed -i 's/var Version = \".*\"/var Version = \"$(VERSION)\"/' pkg/report/types.go
2 changes: 1 addition & 1 deletion pkg/report/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package report

// Version is gopogh version
var Version string
var Version = "v0.0.15"

// Build includes commit sha date
var Build string
Expand Down

0 comments on commit 95640cb

Please sign in to comment.