Skip to content

Commit

Permalink
moved apitest into top level so it can be used with go get -u
Browse files Browse the repository at this point in the history
go standard requires to have a "main.go" in the top level of the project, so it can be easily installed using "go get -u".

Cleaned up Makefile to remove obsolete and unecessary stuff from it.
  • Loading branch information
martinrode committed Jun 9, 2020
1 parent ee43b93 commit 53dc0d1
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ tmpl.go
apitest_report.json
/commands/server/assets/tmpl.go
*.code-workspace
/bin/
*.vscode
*.sh
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
GITCOMMIT=`git log --pretty=format:'%h' -n 1`
BUILDTIMESTAMP=`date -u +%d.%m.%Y_%H:%M:%S_%Z`
GITVERSIONTAG=`git tag -l 'v*' | tail -1`
LDFLAGS=-ldflags "-X main.buildTimeStamp=${BUILDTIMESTAMP} -X main.gitVersion=${GITVERSIONTAG} -X main.gitCommit=${GITCOMMIT}"

all: generate build

generate:
Expand All @@ -12,11 +7,7 @@ test: generate
go vet ./...
go test ./...

gox: generate
go get github.com/mitchellh/gox
gox ${LDFLAGS} -parallel=4 -output="./bin/apitest_{{.OS}}_{{.Arch}}" ./cmd/apitest/

build:
go build ${LDFLAGS} -o ./bin/apitest ./cmd/apitest/
go build

.PHONY: all generate test gox build
.PHONY: all generate test build
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 53dc0d1

Please sign in to comment.