Skip to content

Commit

Permalink
fix: update Makefile to fix version cmd
Browse files Browse the repository at this point in the history
fixes: #14
  • Loading branch information
copernico committed Jun 26, 2020
1 parent e5d53d6 commit 56b7d5a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog (`kaybee` tool)

<a name="v0.5.4.1"></a>
## [v0.5.4.1](https://github.com/SAP/project-kb/compare/v0.5.4...v0.5.4.1) (2020-06-26)

* fix: broken `version` command (#14)

<a name="v0.5.4"></a>
## [v0.5.4](https://github.com/SAP/project-kb/compare/v0.5.3...v0.5.4) (2020-06-25)

* fix: add '//' at the end of backend url if missing
* added some real vulnerability statements

<a name="v0.5.3"></a>
## [v0.5.3](https://github.com/SAP/project-kb/compare/v0.5.2...v0.5.3) (2020-06-24)

Expand Down
15 changes: 8 additions & 7 deletions kaybee/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=kaybee
LDFLAGS=-ldflags='-X "github.com/sap/project-kb/kaybee/cmd.buildDate=$(NOW)" -X "github.com/sap/project-kb/kaybee/cmd.buildCommitID=$(GIT_COMMIT)" -X "github.com/sap/project-kb/kaybee/cmd.version=$(VERSION)"'
BINARY_UNIX=$(BINARY_NAME)-$(VERSION)_linux-amd64
BINARY_WINDOWS=$(BINARY_NAME)-$(VERSION)_win-amd64
BINARY_MACOS=$(BINARY_NAME)-$(VERSION)_darwin-amd64

all: lint vet test build #ui

build: fmt
$(GOBUILD) -ldflags='-X "github.com/sap/project-kb/kaybee/cmd.buildDate=$(NOW)" -X "github.com/sap/project-kb/kaybee/cmd.buildCommitID=$(GIT_COMMIT)" -X "github.com/sap/project-kb/kaybee/cmd.version=$(VERSION)"' -o $(BINARY_NAME) -v
$(GOBUILD) $(LDFLAGS) -o $(BINARY_NAME) -v

# ui:
# $(MAKE) --directory=ui
Expand Down Expand Up @@ -54,14 +55,14 @@ lint: vet

# Cross compilation
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o dist/$(BINARY_UNIX) -v
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) $(LDFLAGS) -o dist/$(BINARY_UNIX) -v

build-win:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o dist/$(BINARY_WINDOWS) -v
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) $(LDFLAGS) -o dist/$(BINARY_WINDOWS) -v

build-macos:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o dist/$(BINARY_MACOS) -v
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) $(LDFLAGS) -o dist/$(BINARY_MACOS) -v

changelog:
$(eval TAG = v$(shell cat VERSION.md))
git-chglog $(TAG)
build-all: build-win build-macos build-linux

.PHONY: build-all
2 changes: 1 addition & 1 deletion kaybee/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.4
0.5.4.1

0 comments on commit 56b7d5a

Please sign in to comment.