Skip to content

Commit 7cc477f

Browse files
author
Caspar van Leeuwen
committed
Make sure the easystack duration gets prepended to the easystack file as a comment
1 parent cebdf18 commit 7cc477f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/generate_easystacks_for_existing_stack/json_to_easystacks_split_by_duration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ while read app; do
1616
# Check if we need to start a new easystack
1717
if [[ ${prev_eb_version} != ${easybuild} ]] || (( current_duration_sum + build_duration_minutes > duration_threshold )); then
1818
if [[ ${current_stack_name} != "" ]]; then
19-
echo "${current_stack_name}: total build duration = ${current_duration_sum} minutes"
19+
{ echo "# ${current_stack_name}: total build duration = ${current_duration_sum} minutes"; cat "${easystack}"; } > temp && mv temp "${easystack}"
2020
fi
2121
easystack_num=$(( easystack_num + 1 ))
2222
prev_eb_version=${easybuild}
@@ -40,7 +40,7 @@ done < <(jq -c '.[]' "${input_file}")
4040

4141
# Print final stack duration
4242
if [[ ${current_stack_name} != "" ]]; then
43-
echo "${current_stack_name}: total build duration = ${current_duration_sum} minutes"
43+
{ echo "# ${current_stack_name}: total build duration = ${current_duration_sum} minutes"; cat "${easystack}"; } > temp && mv temp "${easystack}"
4444
fi
4545

4646
# Print overall total

0 commit comments

Comments
 (0)