Skip to content

Commit 9b0eafe

Browse files
bors[bot]bidoubiwa
andauthored
Merge #450
450: Display whole semver of the SDK in code-samples file r=bidoubiwa a=bidoubiwa For ease of maintenance, I changed the version number in the code-samples to the whole sember Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
2 parents da64ad6 + b00db8c commit 9b0eafe

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

.github/scripts/check-release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
current_tag=$(echo $GITHUB_REF | cut -d '/' -f 3 | sed -r 's/^v//')
55
major=$(echo $current_tag | cut -d '.' -f1)
66
minor=$(echo $current_tag | cut -d '.' -f2)
7-
cropped_current_tag="$major.$minor"
7+
88
file1='Cargo.toml'
99
file2='README.tpl'
1010
file3='.code-samples.meilisearch.yaml'
@@ -21,15 +21,15 @@ file_tag5=$(grep '^version = ' $file5 | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
2121
if [ "$current_tag" != "$file_tag1" ] ||
2222
[ "$current_tag" != "$file_tag_1_1" ] ||
2323
[ "$current_tag" != "$file_tag2" ] ||
24-
[ "$cropped_current_tag" != "$file_tag3" ] ||
24+
[ "$current_tag" != "$file_tag3" ] ||
2525
[ "$current_tag" != "$file_tag4" ] ||
2626
[ "$current_tag" != "$file_tag5" ] \
2727
; then
2828
echo "Error: the current tag does not match the version in package file(s)."
2929
echo "$file1: found $file_tag1 - expected $current_tag"
3030
echo "$file1: found $file_tag_1_1 - expected $current_tag"
3131
echo "$file2: found $file_tag2 - expected $current_tag"
32-
echo "$file3: found $file_tag3 - expected $cropped_current_tag"
32+
echo "$file3: found $file_tag3 - expected $current_tag"
3333
echo "$file4: found $file_tag4 - expected $current_tag"
3434
echo "$file5: found $file_tag5 - expected $current_tag"
3535
exit 1

CONTRIBUTING.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,30 +175,31 @@ Make a PR modifying the file [`Cargo.toml`](/Cargo.toml):
175175
version = "X.X.X"
176176
```
177177

178-
After the changes on `Cargo.toml`, run the following command:
178+
the [`README.tpl`](/README.tpl):
179179

180-
```
181-
sh scripts/update_macro_versions.sh
180+
```rust
181+
//! meilisearch-sdk = "X.X.X"
182182
```
183183

184-
and the [`README.tpl`](/README.tpl):
184+
and the [code-samples file](/.code-samples.meilisearch.yaml):
185185

186-
```rust
187-
//! meilisearch-sdk = "X.X.X"
186+
```yml
187+
meilisearch-sdk = "X.X.X"
188188
```
189189

190190
with the right version.
191191

192-
After the changes on `lib.rs`, run the following command:
193192

194-
```bash
195-
sh scripts/update-readme.sh
193+
After the changes on `Cargo.toml`, run the following command:
194+
195+
```
196+
sh scripts/update_macro_versions.sh
196197
```
197198

198-
You might need to change the [code-samples file](/.code-samples.meilisearch.yaml) if the minor has been upgraded:
199+
After the changes on `lib.rs`, run the following command:
199200

200-
```yml
201-
meilisearch-sdk = "X.X"
201+
```bash
202+
sh scripts/update-readme.sh
202203
```
203204

204205
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/meilisearch-rust/releases): on this page, click on `Edit` (related to the draft release) > update the description (be sure you apply [these recommendations](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md#writting-the-release-description)) > when you are ready, click on `Publish release`.

0 commit comments

Comments
 (0)