Skip to content

Commit

Permalink
Merge #450
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and bidoubiwa authored Mar 20, 2023
2 parents da64ad6 + b00db8c commit 9b0eafe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/check-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
current_tag=$(echo $GITHUB_REF | cut -d '/' -f 3 | sed -r 's/^v//')
major=$(echo $current_tag | cut -d '.' -f1)
minor=$(echo $current_tag | cut -d '.' -f2)
cropped_current_tag="$major.$minor"

file1='Cargo.toml'
file2='README.tpl'
file3='.code-samples.meilisearch.yaml'
Expand All @@ -21,15 +21,15 @@ file_tag5=$(grep '^version = ' $file5 | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
if [ "$current_tag" != "$file_tag1" ] ||
[ "$current_tag" != "$file_tag_1_1" ] ||
[ "$current_tag" != "$file_tag2" ] ||
[ "$cropped_current_tag" != "$file_tag3" ] ||
[ "$current_tag" != "$file_tag3" ] ||
[ "$current_tag" != "$file_tag4" ] ||
[ "$current_tag" != "$file_tag5" ] \
; then
echo "Error: the current tag does not match the version in package file(s)."
echo "$file1: found $file_tag1 - expected $current_tag"
echo "$file1: found $file_tag_1_1 - expected $current_tag"
echo "$file2: found $file_tag2 - expected $current_tag"
echo "$file3: found $file_tag3 - expected $cropped_current_tag"
echo "$file3: found $file_tag3 - expected $current_tag"
echo "$file4: found $file_tag4 - expected $current_tag"
echo "$file5: found $file_tag5 - expected $current_tag"
exit 1
Expand Down
25 changes: 13 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,30 +175,31 @@ Make a PR modifying the file [`Cargo.toml`](/Cargo.toml):
version = "X.X.X"
```

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

```
sh scripts/update_macro_versions.sh
```rust
//! meilisearch-sdk = "X.X.X"
```

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

```rust
//! meilisearch-sdk = "X.X.X"
```yml
meilisearch-sdk = "X.X.X"
```

with the right version.

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

```bash
sh scripts/update-readme.sh
After the changes on `Cargo.toml`, run the following command:

```
sh scripts/update_macro_versions.sh
```

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

```yml
meilisearch-sdk = "X.X"
```bash
sh scripts/update-readme.sh
```

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`.
Expand Down

0 comments on commit 9b0eafe

Please sign in to comment.