Skip to content

Commit a161262

Browse files
committed
fix: fixed grep returning non-zero exit code and failing the pipe
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent 18ef7ff commit a161262

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/prepare-release-monorepo.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,14 @@ jobs:
147147
# In some situations, we may have a test dependency of a module on itself and this
148148
# case must be skipped.
149149
current_module=$(go list)
150-
go list -deps -test \
151-
-f '{{ if .DepOnly }}{{ with .Module }}{{ .Path }}{{ end }}{{ end }}' | \
152-
sort -u | \
153-
grep "^${root_module}" | \
154-
grep -v "^${current_module}$" | \
155150
while read -r module ; do
156151
echo "::notice title=updating-dependency::Updating ${module} to ${TARGET_TAG}"
157152
go mod edit -require "${module}@${TARGET_TAG}"
158-
done
153+
done < <( go list -deps -test \
154+
-f '{{ if .DepOnly }}{{ with .Module }}{{ .Path }}{{ end }}{{ end }}' | \
155+
sort -u | \
156+
grep "^${root_module}" | \
157+
grep -v "^${current_module}$" || true )
159158
echo "Transformed go.mod"
160159
cat go.mod
161160

0 commit comments

Comments
 (0)