From 4ba860f49ae249df36327e07a9438c4f8bf9b046 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Mon, 7 Oct 2024 11:52:11 -0700 Subject: [PATCH] Handle setup.cfg not existing --- release-scripts/bump_versions.sh | 2 +- release-scripts/create_release_commits.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release-scripts/bump_versions.sh b/release-scripts/bump_versions.sh index 4c0a611..fe53bce 100755 --- a/release-scripts/bump_versions.sh +++ b/release-scripts/bump_versions.sh @@ -30,7 +30,7 @@ for i in $(ls $CHECKOUT_DIR); do VERSION=$(python $SCRIPT_DIR/versiontool.py bumpmicro "$old_version") sed -i "s/$old_version/$VERSION/g" $init_file sed -i "s/$old_version/$VERSION/g" pyproject.toml - sed -i "s/$old_version/$VERSION/g" setup.cfg + [ test -f setup.cfg ] && sed -i "s/$old_version/$VERSION/g" setup.cfg else popd diff --git a/release-scripts/create_release_commits.sh b/release-scripts/create_release_commits.sh index da59edd..4b0b34b 100755 --- a/release-scripts/create_release_commits.sh +++ b/release-scripts/create_release_commits.sh @@ -25,7 +25,7 @@ for i in $(ls $CHECKOUT_DIR); do VERSION=$(python $SCRIPT_DIR/versiontool.py undev "$old_version") sed -i "s/$old_version/$VERSION/g" $init_file sed -i "s/$old_version/$VERSION/g" pyproject.toml - sed -i "s/$old_version/$VERSION/g" setup.cfg + [ test -f setup.cfg ] && sed -i "s/$old_version/$VERSION/g" setup.cfg else popd