2022-06-17 01:27:27 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Checking if current tag matches the package version
|
|
|
|
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
|
2022-06-21 16:14:24 +08:00
|
|
|
files='*/Cargo.toml'
|
|
|
|
lock_file='Cargo.lock'
|
2022-06-17 01:27:27 +08:00
|
|
|
|
|
|
|
|
2022-06-21 16:14:17 +08:00
|
|
|
file5=$(grep -A 1 'name = "meilisearch-auth"' $file5 | grep version)
|
|
|
|
|
|
|
|
for file in $file1 $file2 $file3 $file4 $file5;
|
|
|
|
do
|
|
|
|
file_tag=$(grep '^version = ' $file | cut -d '=' -f 2 | tr -d '"' | tr -d ' ')
|
|
|
|
if [ "$current_tag" != "$file_tag" ]; then
|
|
|
|
echo "Error: the current tag does not match the version in package file(s)."
|
|
|
|
echo "$file: found $file_tag - expected $current_tag"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
2022-06-17 01:27:27 +08:00
|
|
|
|
|
|
|
echo 'OK'
|
|
|
|
exit 0
|