Skip to content

Commit

Permalink
specify an exact date format for the makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <[email protected]>
  • Loading branch information
Denys Smirnov authored and dennwc committed Jan 31, 2019
1 parent c2d98d1 commit 37b6391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BUILD_PATH := $(BASE_PATH)/build
CMD_PATH := $(BASE_PATH)/cmd

# Build information
BUILD ?= $(shell date -Iseconds)
BUILD ?= $(shell date +%FT%X%z)
GIT_COMMIT=$(shell git rev-parse HEAD | cut -c1-7)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "-dirty" || true)
DEV_PREFIX := dev
Expand Down Expand Up @@ -57,7 +57,7 @@ LDFLAGS = -X main.version=$(VERSION) -X main.build=$(BUILD)

# Docker
DOCKER_CMD = docker
DOCKER_BUILD = $(DOCKER_CMD) build --build-arg BBLFSHD_VERSION=$(VERSION) --build-arg BBLFSHD_BUILD=$(BUILD)
DOCKER_BUILD = $(DOCKER_CMD) build --build-arg BBLFSHD_VERSION=$(VERSION) --build-arg BBLFSHD_BUILD="$(BUILD)"
DOCKER_RUN = $(DOCKER_CMD) run --rm
DOCKER_BUILD_IMAGE = bblfshd-build
DOCKER_TAG ?= $(DOCKER_CMD) tag
Expand Down
2 changes: 1 addition & 1 deletion cmd/bblfshd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func main() {
os.Exit(1)
}

parsedBuild, err := time.Parse("2006-01-02T15:04:05-07:00", build)
parsedBuild, err := time.Parse("2006-01-02T15:04:05-0700", build)
if err != nil {
logrus.Errorf("wrong date format for build: %s", err)
os.Exit(1)
Expand Down

0 comments on commit 37b6391

Please sign in to comment.