Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 914cbe9

Browse files
author
Corneil du Plessis
committed
[CI] Update build-package-bundle.sh to check for presence of time.
1 parent 3d2eafb commit 914cbe9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/actions/build-package-bundle/build-package-bundle.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,17 @@ check_env IMGPKG_LOCK_TEMPLATE
3737
check_env VENDIR_SRC_IN
3838

3939
echo "Build Package Bundle: $PACKAGE_BUNDLE_TEMPLATE package.name=$PACKAGE_NAME, server.repository=$SERVER_REPOSITORY, server.version=$SERVER_VERSION,skipper.repository=$SKIPPER_REPOSITORY, skipper.version=$SKIPPER_VERSION, output=$PACKAGE_BUNDLE_GENERATED"
40-
40+
set +e
41+
time ls > /dev/null 2>&1
42+
RC=$?
43+
if((RC=0)); then
44+
MEASURE="time -v -o times.txt -a"
45+
else
46+
MEASURE=""
47+
fi
4148
set -e
4249
echo "ytt -f $PACKAGE_BUNDLE_TEMPLATE" > times.txt
43-
MEASURE="time -v -o times.txt -a"
50+
4451
$MEASURE ytt -f "$PACKAGE_BUNDLE_TEMPLATE" \
4552
--output-files "$PACKAGE_BUNDLE_GENERATED" \
4653
--data-value-yaml server.version="$SERVER_VERSION" \

0 commit comments

Comments
 (0)