Skip to content

Commit

Permalink
Remove extra space. Remove version.go.
Browse files Browse the repository at this point in the history
  • Loading branch information
swhsiang committed Sep 14, 2017
1 parent 51ec025 commit 0c19b2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

BIN_NAME=ingestor

VERSION := $(shell grep "const Version " version.go | sed -E 's/.*"(.+)"$$/\1/')
GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
IMAGE_NAME := "hyperpilot/ingestor"
Expand All @@ -24,32 +23,30 @@ help:
@echo

build:
@echo "building ${BIN_NAME} ${VERSION}"
@echo "building ${BIN_NAME}"
@echo "GOPATH=${GOPATH}"
go build -ldflags "-X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X main.VersionPrerelease=DEV" -o bin/${BIN_NAME}

get-deps:
glide install

build-alpine:
@echo "building ${BIN_NAME} ${VERSION}"
@echo "building ${BIN_NAME}"
@echo "GOPATH=${GOPATH}"
go build -ldflags '-w -linkmode external -extldflags "-static" -X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X main.VersionPrerelease=VersionPrerelease=RC' -o bin/${BIN_NAME}

package:
@echo "building image ${BIN_NAME} ${VERSION} $(GIT_COMMIT)"
docker build --build-arg VERSION=${VERSION} --build-arg GIT_COMMIT=$(GIT_COMMIT) -t $(IMAGE_NAME):local .
@echo "building image ${BIN_NAME} $(GIT_COMMIT)"
docker build --build-arg GIT_COMMIT=$(GIT_COMMIT) -t $(IMAGE_NAME):local .

tag:
@echo "Tagging: latest ${VERSION} $(GIT_COMMIT)"
@echo "Tagging: latest $(GIT_COMMIT)"
docker tag $(IMAGE_NAME):local $(IMAGE_NAME):$(GIT_COMMIT)
docker tag $(IMAGE_NAME):local $(IMAGE_NAME):${VERSION}
docker tag $(IMAGE_NAME):local $(IMAGE_NAME):latest

push: tag
@echo "Pushing docker image to registry: latest ${VERSION} $(GIT_COMMIT)"
@echo "Pushing docker image to registry: latest $(GIT_COMMIT)"
docker push $(IMAGE_NAME):$(GIT_COMMIT)
docker push $(IMAGE_NAME):${VERSION}
docker push $(IMAGE_NAME):latest

clean:
Expand Down
1 change: 0 additions & 1 deletion log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func NewLogger(cfg config.Provider) *Logger {
}

func newLogrusLogger(cfg config.Provider) *logrus.Logger {

l := logrus.New()

if cfg.GetBool("JSONLog") {
Expand Down
12 changes: 0 additions & 12 deletions version.go

This file was deleted.

0 comments on commit 0c19b2f

Please sign in to comment.