From 48ff055cb2b474acdfe9e4c1f1133ae5e668bc1b Mon Sep 17 00:00:00 2001 From: Mila Page Date: Thu, 21 Mar 2024 02:43:55 -0700 Subject: [PATCH] Guard sed to avoid errors on pg. --- .github/workflows/internal-archive-release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/internal-archive-release.yml b/.github/workflows/internal-archive-release.yml index e44f6fb..0a701c8 100644 --- a/.github/workflows/internal-archive-release.yml +++ b/.github/workflows/internal-archive-release.yml @@ -252,11 +252,15 @@ jobs: new_number=$((number + 1)) v="${base}${new_number}" tee <<< "version = \"${v}\"" "${version_file}" - sed -i "s/^package_version = \".*\"/package_version = \"${v}\"/" "${setup_file}" + if [ -f "${setup_file}" ]; then + sed -i "s/^package_version = \".*\"/package_version = \"${v}\"/" "${setup_file}" + fi else v="${version_in_file}+build1" tee <<< "version = \"${v}\"" "${version_file}" - sed -i "s/^package_version = \".*\"/package_version = \"${v}\"/" "${setup_file}" + if [ -f "${setup_file}" ]; then + sed -i "s/^package_version = \".*\"/package_version = \"${v}\"/" "${setup_file}" + fi fi ################