Skip to content

Commit 896c700

Browse files
committed
chore: create_archive_and_notes.sh: correctly capture and check grep result
1 parent dc65c65 commit 896c700

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/create_archive_and_notes.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
set -o errexit -o nounset -o pipefail
16+
set -o nounset
17+
set -o pipefail
18+
set -o errexit
1719

20+
set -x
1821
# Exclude dot directories, specifically, this file so that we don't
1922
# find the substring we're looking for in our own file.
2023
# Exclude CONTRIBUTING.md, RELEASING.md because they document how to use these strings.
@@ -23,9 +26,9 @@ grep --exclude=CONTRIBUTING.md \
2326
--exclude=release.py \
2427
--exclude=release_test.py \
2528
--exclude-dir=.* \
26-
VERSION_NEXT_ -r
27-
grep_exit_code=$?
28-
if $grep_exit_code -ne 0; then
29+
VERSION_NEXT_ -r || grep_exit_code=$?
30+
31+
if [[ $grep_exit_code -eq 0 ]]; then
2932
echo
3033
echo "Found VERSION_NEXT markers indicating version needs to be specified"
3134
exit 1

0 commit comments

Comments
 (0)