ci: use tags as markers

This commit is contained in:
Fu Hanxi
2022-05-22 00:38:17 +08:00
parent 3e78898d2c
commit 7e0bb1dabd
4 changed files with 118 additions and 128 deletions
+10 -5
View File
@@ -62,17 +62,22 @@ function warning() {
}
function run_cmd() {
local args=( "$@" )
local cmd="${args[@]}"
local start=$(date +%s)
eval "$@"
info "\$ ${cmd}"
eval "${cmd}"
local ret=$?
local end=$(date +%s)
local duration=$((end - start))
local runtime=$((end-start))
if [[ $ret -eq 0 ]]; then
info "(\$ $*) succeeded in ${duration} seconds."
info "==> '\$ ${cmd}' succeeded in ${runtime} seconds."
return 0
else
error "(\$ $*) failed in ${duration} seconds."
echo
error "==> '\$ ${cmd}' failed (${ret}) in ${runtime} seconds."
return $ret
fi
}