Skip to content

Commit

Permalink
v0.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
medyagh committed Dec 19, 2019
1 parent f9e6888 commit 67abe31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
BINARY=gopogh
VERSION=`git fetch;git describe --tags > /dev/null 2>&1`
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=-ldflags "-X github.com/medyagh/gopogh/out.Version=${VERSION} -X github.com/medyagh/gopogh/out.Build=${BUILD}"
LDFLAGS=-ldflags "-X github.com/medyagh/gopogh/out.Build=${BUILD}"

generate_json:
go tool test2json -t < ./testdata/minikube-logs.txt > ./testdata/minikube-logs.json
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ var (
reportRepo = flag.String("repo", "", "source repo")
inPath = flag.String("in", "", "path to JSON input file")
outPath = flag.String("out", "", "path to HTML output file")
version = flag.Bool("version", true, "shows version")
version = flag.Bool("version", false, "shows version")
)

func main() {
flag.Parse()
if *version {
fmt.Printf("Version %s Build %s", out.Version, out.Build)
return
}

if *inPath == "" {
Expand Down
5 changes: 3 additions & 2 deletions out/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/medyagh/gopogh/models"
)

const Version = "v0.0.15" // Version is gopogh version

var (
Version string // Version is gopogh version
Build string // Build includes commit sha date
Build string // commitsha injected during build
)

func mod(a, b int) int {
Expand Down
4 changes: 2 additions & 2 deletions run_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ COMMIT=cd7cac61d3f8df1026f6b4a2689b362e132dfe4b

${DOCKER_BIN} run --mount type=bind,source="${JSON_OUT}",target=/tmp/out.json \
--mount type=bind,source="${TEST_INPUT}",target=/tmp/log.txt \
-i medyagh/gopogh:v0.0.13 \
-i medyagh/gopogh:latest \
sh -c "go tool test2json -t < /tmp/log.txt > /tmp/out.json" || true


set +ex
${DOCKER_BIN} run --rm --mount type=bind,source=${JSON_OUT},target=/tmp/log.json \
--mount type=bind,source="${HTML_OUT}",target=/tmp/log.html \
-i medyagh/gopogh:v0.0.13 sh -c \
-i medyagh/gopogh:latest sh -c \
"/gopogh -in /tmp/log.json -out /tmp/log.html -name "${JOB_NAME}" -pr ${MINIKUBE_LOCATION} -repo github.com/kubernetes/minikube/ -details ${COMMIT}" || true

0 comments on commit 67abe31

Please sign in to comment.