Skip to content

Commit

Permalink
Remove old checks on check-release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoocasali committed May 17, 2023
1 parent 4a67bbf commit 4439c6f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/scripts/check-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@
current_tag=$(echo $GITHUB_REF | cut -d '/' -f 3 | sed -r 's/^v//')

file1='pubspec.yaml'
file2='example/pubspec.yaml'
file3='example/pubspec.lock'
file4='README.md'
file5='lib/src/version.dart'
file2='README.md'
file3='lib/src/version.dart'
changelog_file='CHANGELOG.md'
ret=0

file_tag1=$(grep '^version: ' $file1 | cut -d ':' -f 2 | tr -d ' ')
file_tag2=$(grep 'meilisearch: "' $file2 | cut -d ':' -f 2 | tr -d '"' | tr -d ' ')
file_tag3=$(grep 'meilisearch' -A 6 $file3 | grep 'version: ' | cut -d ':' -f2 | tr -d '"' | tr -d ' ')
file_tag4=$(grep 'meilisearch: ' $file4 | cut -d '^' -f2)
file_tag5=$(grep -o "[0-9\.]" $file5 | tr -d '[:space:]')
if [ "$current_tag" != "$file_tag1" ] || [ "$current_tag" != "$file_tag2" ] || [ "$current_tag" != "$file_tag3" ] || [ "$current_tag" != "$file_tag4" ] || [ "$current_tag" != "$file_tag5" ]; then
file_tag2=$(grep 'meilisearch: ' $file2 | cut -d '^' -f2)
file_tag3=$(grep -o "[0-9\.]" $file3 | tr -d '[:space:]')
if [ "$current_tag" != "$file_tag1" ] || [ "$current_tag" != "$file_tag2" ] || [ "$current_tag" != "$file_tag3" ]; then
echo "Error: the current tag does not match the version in package file(s)."
echo "$file1: found $file_tag1 - expected $current_tag"
echo "$file2: found $file_tag2 - expected $current_tag"
echo "$file3: found $file_tag3 - expected $current_tag"
echo "$file4: found $file_tag4 - expected $current_tag"
echo "$file5: found $file_tag5 - expected $current_tag"
ret=1
fi

Expand Down

0 comments on commit 4439c6f

Please sign in to comment.