mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Fix CI with check-release.sh script
This commit is contained in:
parent
9e261b996f
commit
f83188fd60
4 changed files with 11 additions and 11 deletions
10
.github/scripts/check-release.sh
vendored
10
.github/scripts/check-release.sh
vendored
|
@ -1,15 +1,15 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# check_tag $current_tag $file_tag $file_name
|
||||
function check_tag {
|
||||
if [ "$1" != "$2" ]; then
|
||||
echo "Error: the current tag does not match the version in $3: found $1 - expected $2"
|
||||
if [[ "$1" != "$2" ]]; then
|
||||
echo "Error: the current tag does not match the version in $3: found $2 - expected $1"
|
||||
ret=1
|
||||
fi
|
||||
}
|
||||
|
||||
ret=0
|
||||
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
|
||||
current_tag=${GITHUB_REF#'refs/tags/v'}
|
||||
|
||||
toml_files='*/Cargo.toml'
|
||||
for toml_file in $toml_files;
|
||||
|
@ -22,7 +22,7 @@ lock_file='Cargo.lock'
|
|||
lock_tag=$(grep -A 1 'name = "meilisearch-auth"' $lock_file | grep version | cut -d '=' -f 2 | tr -d '"' | tr -d ' ')
|
||||
check_tag $current_tag $lock_tag $lock_file
|
||||
|
||||
if [ "$ret" -eq 0 ] ; then
|
||||
if [[ "$ret" -eq 0 ]] ; then
|
||||
echo 'OK'
|
||||
fi
|
||||
exit $ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue