Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Commit timestamp #51

Merged
merged 1 commit into from
Mar 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/git/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ git/show:
@echo "latest tag - $(GIT_LATEST_TAG)"
@echo "tag - $(GIT_IS_TAG)"
@echo "branch - $(GIT_IS_BRANCH)"
@echo "timestamp - $(GIT_TIMESTAMP)"

## Export git vars
git/export:
Expand All @@ -26,3 +27,4 @@ git/export:
@echo "GIT_LATEST_TAG=$(GIT_LATEST_TAG)"
@echo "GIT_IS_BRANCH=$(GIT_IS_BRANCH)"
@echo "GIT_IS_TAG=$(GIT_IS_TAG)"
@echo "GIT_TIMESTAMP=$(GIT_TIMESTAMP)"
2 changes: 2 additions & 0 deletions modules/git/bootstrap.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export GIT_COMMIT_SHORT ?= $(shell $(GIT) rev-parse --verify --short HEAD)
export GIT_BRANCH ?= $(shell $(GIT) rev-parse --abbrev-ref HEAD)
export GIT_LATEST_TAG ?= $(shell $(GIT) describe --tags --abbrev=0 2>/dev/null)

export GIT_TIMESTAMP ?= $(shell $(GIT) log -1 --format=%ct 2>/dev/null)

ifeq ($(GIT_LATEST_TAG),)
export GIT_LATEST_TAG="0.0.0"
endif
Expand Down