File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 22
33# Checking if current tag matches the package version
44current_tag=$( echo $GITHUB_REF | tr -d ' refs/tags/v' )
5+ major=$( echo $current_tag | cut -d ' .' -f1 )
6+ minor=$( echo $current_tag | cut -d ' .' -f2 )
7+ cropped_current_tag=" $major .$minor "
58file1=' Cargo.toml'
69file2=' src/lib.rs'
10+ file3=' .code-samples.meilisearch.yaml'
11+ file4=' README.md'
712
813file_tag1=$( grep ' ^version = ' $file1 | cut -d ' =' -f 2 | tr -d ' "' | tr -d ' ' )
914file_tag2=$( grep ' //! meilisearch-sdk = ' $file2 | cut -d ' =' -f 2 | tr -d ' "' | tr -d ' ' )
10- if [ " $current_tag " != " $file_tag1 " ] || [ " $current_tag " != " $file_tag2 " ]; then
15+ file_tag3=$( grep ' meilisearch-sdk = ' $file3 | cut -d ' =' -f 2 | tr -d ' "' | tr -d ' ' )
16+ file_tag4=$( grep ' meilisearch-sdk = ' $file4 | cut -d ' =' -f 2 | tr -d ' "' | tr -d ' ' )
17+ if [ " $current_tag " != " $file_tag1 " ] || [ " $current_tag " != " $file_tag2 " || " $cropped_current_tag " != " $file_tag3 " || " $cropped_current_tag " != " $file_tag4 " ]; then
1118 echo " Error: the current tag does not match the version in package file(s)."
1219 echo " $file1 : found $file_tag1 - expected $current_tag "
1320 echo " $file2 : found $file_tag2 - expected $current_tag "
21+ echo " $file3 : found $file_tag3 - expected $cropped_current_tag "
22+ echo " $file4 : found $file_tag4 - expected $cropped_current_tag "
1423 exit 1
1524fi
1625
You can’t perform that action at this time.
0 commit comments