File tree Expand file tree Collapse file tree 5 files changed +14
-12
lines changed
Expand file tree Collapse file tree 5 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ build:
103103 @echo " -antigen-env-setup" >> ${TARGET}
104104 @echo " ${VERSION} " > ${VERSION_FILE}
105105 @$( call ised," s/{{ANTIGEN_VERSION}}/$$ (cat ${VERSION_FILE} )/" ,${TARGET} )
106+ @$( call ised," s/{{ANTIGEN_REVISION}}/$$ (git log -n1 --format=%h -- . ':(exclude)bin')/" ,${TARGET} )
107+ @$( call ised," s/{{ANTIGEN_REVISION_DATE}}/$$ (TZ=UTC date -d @$$ (git log -n1 --format='%at' -- . ':(exclude)bin') '+%F %T %z')/" ,${TARGET} )
106108ifeq (${WITH_DEBUG} , no)
107109 @$( call isede," s/ (WARN|LOG|ERR|TRACE) .*&//" ,${TARGET} )
108110 @$( call isede," / (WARN|LOG|ERR|TRACE) .*/d" ,${TARGET} )
Original file line number Diff line number Diff line change 9191 @echo " -antigen-env-setup" >> ${TARGET}
9292 @echo " ${VERSION} " > ${VERSION_FILE}
9393 @$( call ised," s/{{ANTIGEN_VERSION}}/$$ (cat ${VERSION_FILE} )/" ,${TARGET} )
94+ @$( call ised," s/{{ANTIGEN_REVISION}}/$$ (git log -n1 --format=%h -- . ':(exclude)bin')/" ,${TARGET} )
95+ @$( call ised," s/{{ANTIGEN_REVISION_DATE}}/$$ (TZ=UTC date -d @$$ (git log -n1 --format='%at' -- . ':(exclude)bin') '+%F %T %z')/" ,${TARGET} )
9496ifeq (${WITH_DEBUG} , no)
9597 @$( call isede," s/ (WARN|LOG|ERR|TRACE) .*&//" ,${TARGET} )
9698 @$( call isede," / (WARN|LOG|ERR|TRACE) .*/d" ,${TARGET} )
Original file line number Diff line number Diff line change @@ -1383,13 +1383,11 @@ antigen-use () {
13831383 fi
13841384}
13851385antigen-version () {
1386- local version=" develop"
1387- local extensions revision=" "
1388- if [[ -d $_ANTIGEN_INSTALL_DIR /.git ]]; then
1389- revision=" ($( git --git-dir=$_ANTIGEN_INSTALL_DIR /.git rev-parse --short ' @' ) )"
1390- fi
1386+ local extensions
1387+
1388+ printf " Antigen %s (%s)\nRevision date: %s\n" " develop" " 2f87993" " 2017-12-31 02:09:55 +0000"
13911389
1392- printf " Antigen %s%s\n " $version $revision
1390+ # Show extension information if any is available
13931391 if (( $+ functions[antigen- ext] )) ; then
13941392 typeset -a extensions; extensions=($( antigen-ext-list) )
13951393 if [[ $# extensions -gt 0 ]]; then
Original file line number Diff line number Diff line change 11antigen-version () {
2- local version=" {{ANTIGEN_VERSION}}"
3- local extensions revision=" "
4- if [[ -d $_ANTIGEN_INSTALL_DIR /.git ]]; then
5- revision=" ($( git --git-dir=$_ANTIGEN_INSTALL_DIR /.git rev-parse --short ' @' ) )"
6- fi
2+ local extensions
3+
4+ printf " Antigen %s (%s)\nRevision date: %s\n" " {{ANTIGEN_VERSION}}" " {{ANTIGEN_REVISION}}" " {{ANTIGEN_REVISION_DATE}}"
75
8- printf " Antigen %s%s\n " $version $revision
6+ # Show extension information if any is available
97 if (( $+ functions[antigen- ext] )) ; then
108 typeset -a extensions; extensions=($( antigen-ext-list) )
119 if [[ $# extensions -gt 0 ]]; then
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ Antigen version command.
22
33 $ antigen-version
44 Antigen * (glob)
5+ Revision date: * (glob)
56
67 $ antigen version
78 Antigen * (glob)
9+ Revision date: * (glob)
You can’t perform that action at this time.
0 commit comments