diff --git a/.github/scripts/check-release.sh b/.github/scripts/check-release.sh index 41c8bf3b..d438683c 100644 --- a/.github/scripts/check-release.sh +++ b/.github/scripts/check-release.sh @@ -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' @@ -21,7 +21,7 @@ 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 @@ -29,7 +29,7 @@ if [ "$current_tag" != "$file_tag1" ] || 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f60043d1..0b8ef40d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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`.