diff --git a/.github/workflows/generation_check.yaml b/.github/workflows/generation_check.yaml index 4e8c12451f2..2b56938a27c 100644 --- a/.github/workflows/generation_check.yaml +++ b/.github/workflows/generation_check.yaml @@ -59,7 +59,12 @@ jobs: echo "==================== GIT DIFF ====================" git diff echo "==================================================" - echo "Regeneration failed. Please run 'librarian generate --all' to update the generated files." + V=$(sed -n 's/^version: //p' librarian.yaml) + echo "Regeneration failed. Please run:" + echo "" + echo " go run github.com/googleapis/librarian/cmd/librarian@$V generate --all" + echo "" + echo "to update the generated files." exit 1 fi - name: Create issue if previous step fails diff --git a/.github/workflows/librarian_tidy.yml b/.github/workflows/librarian_tidy.yml index e830d1d3f18..70a1f21f894 100644 --- a/.github/workflows/librarian_tidy.yml +++ b/.github/workflows/librarian_tidy.yml @@ -37,10 +37,10 @@ jobs: if: steps.changes.outputs.librarian == 'true' run: | if ! git diff --exit-code; then - V=$(librarian config get version 2>/dev/null || echo "latest") + V=$(sed -n 's/^version: //p' librarian.yaml) echo "librarian.yaml is not tidy. Please run:" echo "" - echo " librarian tidy" + echo " go run github.com/googleapis/librarian/cmd/librarian@$V tidy" echo "" echo "to tidy librarian.yaml and commit the changes." exit 1