mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-22 20:50:04 +01:00
Update script after review
This commit is contained in:
parent
de16de20f4
commit
c6ed756dbc
34
.github/scripts/check-release.sh
vendored
34
.github/scripts/check-release.sh
vendored
@ -1,22 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Checking if current tag matches the package version
|
||||
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
|
||||
files='*/Cargo.toml'
|
||||
lock_file='Cargo.lock'
|
||||
|
||||
|
||||
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"
|
||||
# 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:"
|
||||
echo "Found $1 - expected $2"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
|
||||
|
||||
files='*/Cargo.toml'
|
||||
for file in $files;
|
||||
do
|
||||
file_tag="$(grep '^version = ' $file | cut -d '=' -f 2 | tr -d '"' | tr -d ' ')"
|
||||
check_tag $current_tag $file_tag $file
|
||||
done
|
||||
|
||||
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
|
||||
|
||||
echo 'OK'
|
||||
exit 0
|
||||
|
2
.github/scripts/is-latest-release.sh
vendored
2
.github/scripts/is-latest-release.sh
vendored
@ -7,7 +7,7 @@
|
||||
# Ex: previous tag -> v2.1.1
|
||||
# new tag -> v1.20.3
|
||||
# The new tag (v1.20.3) should NOT be the latest
|
||||
# So it returns "false", the `latest tag` should not be updated for the release v1.20.3 and still need to correspond to v2.1.1
|
||||
# So it returns "false", the `latest` tag should not be updated for the release v1.20.3 and still need to correspond to v2.1.1
|
||||
|
||||
# GLOBAL
|
||||
GREP_SEMVER_REGEXP='v\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)$' # i.e. v[number].[number].[number]
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2515,7 +2515,7 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
||||
|
||||
[[package]]
|
||||
name = "permissive-json-pointer"
|
||||
version = "0.2.0"
|
||||
version = "0.28.0"
|
||||
dependencies = [
|
||||
"big_s",
|
||||
"serde_json",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "permissive-json-pointer"
|
||||
version = "0.2.0"
|
||||
version = "0.28.0"
|
||||
edition = "2021"
|
||||
description = "A permissive json pointer"
|
||||
readme = "README.md"
|
||||
|
Loading…
x
Reference in New Issue
Block a user