feat: expose last-updated-at in git:report
This commit is contained in:
1 parent
a8a6d0595b
commit
6901e9658f
1 file changed
+12
@@ -42,6 +42,7 @@ cmd-git-report-single() {
|
|||||||
"--git-keep-git-dir: $(fn-plugin-property-get "git" "$APP" "keep-git-dir" "false")"
|
"--git-keep-git-dir: $(fn-plugin-property-get "git" "$APP" "keep-git-dir" "false")"
|
||||||
"--git-rev-env-var: $(fn-plugin-property-get "git" "$APP" "rev-env-var" "GIT_REV")"
|
"--git-rev-env-var: $(fn-plugin-property-get "git" "$APP" "rev-env-var" "GIT_REV")"
|
||||||
"--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2>/dev/null || false)"
|
"--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2>/dev/null || false)"
|
||||||
|
"--git-last-updated-at: $(fn-git-last-updated-at "$APP")"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -z "$INFO_FLAG" ]]; then
|
if [[ -z "$INFO_FLAG" ]]; then
|
||||||
@@ -70,6 +71,17 @@ cmd-git-report-single() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn-git-last-updated-at() {
|
||||||
|
declare desc="retrieve the deploy branch for a given application"
|
||||||
|
declare APP="$1"
|
||||||
|
local DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
||||||
|
local HEAD_FILE="/home/dokku/test/refs/heads/$DOKKU_DEPLOY_BRANCH"
|
||||||
|
|
||||||
|
if [[ -f "$HEAD_FILE" ]]; then
|
||||||
|
stat -c %Y "$HEAD_FILE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
fn-git-deploy-branch() {
|
fn-git-deploy-branch() {
|
||||||
declare desc="retrieve the deploy branch for a given application"
|
declare desc="retrieve the deploy branch for a given application"
|
||||||
local APP="$1"
|
local APP="$1"
|
||||||
|
|||||||
Reference in new issue
Block a user