From adf175fdc26284b96663890886611ba5ebf6bccb Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 30 Jan 2024 18:44:24 -0500 Subject: [PATCH 1/2] Ignore empty lines in packages_by_dep_dag file --- packages/build_packages.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/build_packages.sh b/packages/build_packages.sh index 249b9143df5c..5b309c68ff2c 100755 --- a/packages/build_packages.sh +++ b/packages/build_packages.sh @@ -10,14 +10,17 @@ cd "$(dirname "$0")" # ensure ordered by dependency dag while read -r package_dir; do - printf "\n========= RELEASING PACKAGE ${package_dir} =========\n\n" - - cd "$package_dir" - - make clean - make commit-version - make dist - make new-version - - cd .. + if [ -n "$package_dir" ] + then + printf "\n========= RELEASING PACKAGE %s =========\n\n" "$package_dir" + + cd "$package_dir" + + make clean + make commit-version + make dist + make new-version + + cd .. + fi done < packages_by_dep_dag.txt From c1081c328908372afa3fae7c055aaeef77df69e2 Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 30 Jan 2024 21:57:22 -0500 Subject: [PATCH 2/2] Reverse conditional to skip empty lines --- packages/build_packages.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/build_packages.sh b/packages/build_packages.sh index 5b309c68ff2c..dde18ce11324 100755 --- a/packages/build_packages.sh +++ b/packages/build_packages.sh @@ -10,17 +10,18 @@ cd "$(dirname "$0")" # ensure ordered by dependency dag while read -r package_dir; do - if [ -n "$package_dir" ] - then - printf "\n========= RELEASING PACKAGE %s =========\n\n" "$package_dir" - - cd "$package_dir" - - make clean - make commit-version - make dist - make new-version - - cd .. - fi + if [ -z "$package_dir" ]; then + # Skip empty lines + continue + fi + printf "\n========= RELEASING PACKAGE %s =========\n\n" "$package_dir" + + cd "$package_dir" + + make clean + make commit-version + make dist + make new-version + + cd .. done < packages_by_dep_dag.txt