ci: use tags as markers
This commit is contained in:
+10
-5
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user