chore: fix create_archive_and_notes to ignore release tool markers (#3355)
The create_archive_and_notes.sh script is incorrectly detecting the
version markers
in the tool meant to rewrite them. To fix, ignore those files.
diff --git a/.github/workflows/create_archive_and_notes.sh b/.github/workflows/create_archive_and_notes.sh
index a21585f..b53c49a 100755
--- a/.github/workflows/create_archive_and_notes.sh
+++ b/.github/workflows/create_archive_and_notes.sh
@@ -13,12 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set -o errexit -o nounset -o pipefail
+set -o nounset
+set -o pipefail
+set -o errexit
+set -x
# Exclude dot directories, specifically, this file so that we don't
# find the substring we're looking for in our own file.
# Exclude CONTRIBUTING.md, RELEASING.md because they document how to use these strings.
-if grep --exclude=CONTRIBUTING.md --exclude=RELEASING.md --exclude-dir=.* VERSION_NEXT_ -r; then
+grep --exclude=CONTRIBUTING.md \
+ --exclude=RELEASING.md \
+ --exclude=release.py \
+ --exclude=release_test.py \
+ --exclude-dir=.* \
+ VERSION_NEXT_ -r || grep_exit_code=$?
+
+if [[ $grep_exit_code -eq 0 ]]; then
echo
echo "Found VERSION_NEXT markers indicating version needs to be specified"
exit 1