-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document risk of version mismatch, add GHA check
- Loading branch information
Charles Daniels
committed
Jun 25, 2024
1 parent
93c8a00
commit df6cd62
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# This script checks that the version numbers reported in RELEASES.md and in | ||
# .speakeasy/gen.yaml match. | ||
|
||
set -e | ||
set -u | ||
set -x | ||
|
||
GEN_YAML_VERSION="$(opa eval -f raw -I 'input.java.version' < .speakeasy/gen.yaml)" | ||
|
||
RELEASES_MD_VERSION="$(awk '/^### Generated/ {s=1} s==1 && /java v[0-9]/ {s=0; print}' < RELEASES.md | tail -n1 | cut -d'[' -f 2 | cut -d']' -f 1 | cut -d' ' -f2 | tr -d 'v')" | ||
|
||
if [ "$GEN_YAML_VERSION" != "$RELEASES_MD_VERSION" ] ; then | ||
printf "ERROR: .speakeasy/gen.yaml (%s) and RELEASES.md (%s) disagree on the current version, creating a release in this state may result in inconsistent versions appearing in Maven and GitHub\n" "$GEN_YAML_VERSION" "$RELEASES_MD_VERSION" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
exit 0 |