|
@@ -54,6 +54,9 @@ git_fact() {
|
54
|
54
|
latest_sha)
|
55
|
55
|
git log -1 --pretty=format:%h HEAD
|
56
|
56
|
;;
|
|
57
|
+ latest_cdate)
|
|
58
|
+ git log -1 --format=%cd --date=unix HEAD
|
|
59
|
+ ;;
|
57
|
60
|
*)
|
58
|
61
|
warn "unknown git fact asked: $fact_name"
|
59
|
62
|
;;
|
|
@@ -140,12 +143,13 @@ semver() {
|
140
|
143
|
local latest_tag
|
141
|
144
|
local commit
|
142
|
145
|
local dirty=F
|
143
|
|
- local btime
|
|
146
|
+ local btime
|
144
|
147
|
local suffix
|
145
|
148
|
prerl=$(ini 1value project:prerl)
|
146
|
149
|
case $MKIT_TTAG in
|
147
|
150
|
none) btime= ;;
|
148
|
|
- btime) btime=$(printf '%08x' "$(date +%s)") ;;
|
|
151
|
+ btime) btime=$(date -u +%Y%m%d%H%M%S) ;;
|
|
152
|
+ ctime) btime=$(date -d @"$(git_fact latest_cdate)" -u +%Y%m%d%H%M%S) ;;
|
149
|
153
|
esac
|
150
|
154
|
grep ":" <<<"$prerl" \
|
151
|
155
|
&& warn "colon in project:prerl may corrupt version data: $prerl"
|