From 545423685dc62ef447103134ca52bf4f89200227 Mon Sep 17 00:00:00 2001 From: Yann Prono Date: Sun, 15 Dec 2024 16:01:03 +0100 Subject: [PATCH] fix: fix rust imports with `native` feature --- .github/workflows/developer-experience.yml | 2 +- .github/workflows/semver-checks.yml | 6 +++--- crates/lib/src/kafka/mod.rs | 3 ++- docs/release/README.md | 15 +++++++++++++-- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/developer-experience.yml b/.github/workflows/developer-experience.yml index 0d556d0..ca03fc8 100644 --- a/.github/workflows/developer-experience.yml +++ b/.github/workflows/developer-experience.yml @@ -38,7 +38,7 @@ jobs: - name: Run try-it.sh run: bash docs/try-it.sh env: - YOZEFU_API_URL: http://localhost:8082/schemas/types + YOZEFU_API_URL: http://localhost:8081/schemas/types wasm-rust: runs-on: ubuntu-latest diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml index dc87675..3568d71 100644 --- a/.github/workflows/semver-checks.yml +++ b/.github/workflows/semver-checks.yml @@ -62,10 +62,10 @@ jobs: - name: Make sure version is updated if: ${{ steps.current.outputs.version == steps.next.outputs.version }} run: | - echo "::warning title=Next version:: Last public version is '${{ steps.current.outputs.version }}' but version of this branch is '${{ steps.next.outputs.version }}'. Did you forget to update the version? More details at https://github.com/MAIF/yozefu/blob/main/docs/release.md" + echo "::warning title=Next version:: Last public version is '${{ steps.current.outputs.version }}' but version of this branch is '${{ steps.next.outputs.version }}'. Did you forget to update the version? More details at https://github.com/MAIF/yozefu/blob/main/docs/release/README.md" printf 'This pull request is not ready because the crate version is equals to the latest git tag version `' > report.md printf "${{ steps.next.outputs.version }}" >> report.md - printf '`. I think you forgot to bump the version. More details at https://github.com/MAIF/yozefu/blob/main/docs/release.md' >> report.md + printf '`. I think you forgot to bump the version. More details at https://github.com/MAIF/yozefu/blob/main/docs/release/README.md' >> report.md gh pr comment ${{ github.event.number }} --body-file ./report.md exit 1 env: @@ -88,7 +88,7 @@ jobs: - name: Run cargo semver-checks if: ${{ steps.next.outputs.version != '' && steps.semver.outputs.release != '' }} id: check - run: cargo semver-checks --color never --package yozefu-lib --package yozefu-app --package yozefu-types --baseline-rev "${{ steps.current.outputs.version }}" --release-type "${{ steps.semver.outputs.release }}" >> "$GITHUB_OUTPUT" + run: cargo semver-checks --color never --package yozefu-lib --package yozefu-app --package yozefu-wasm-types --package yozefu-command --baseline-rev "${{ steps.current.outputs.version }}" --release-type "${{ steps.semver.outputs.release }}" >> "$GITHUB_OUTPUT" - name: Publish semver-checks report if: ${{ steps.check.outcome != 'success' && steps.check.outcome != 'skipped' }} run: | diff --git a/crates/lib/src/kafka/mod.rs b/crates/lib/src/kafka/mod.rs index ca49cf7..d7b050a 100644 --- a/crates/lib/src/kafka/mod.rs +++ b/crates/lib/src/kafka/mod.rs @@ -10,6 +10,8 @@ pub mod topic; pub use schema_registry_client::SchemaRegistryClient; #[cfg(feature = "native")] mod avro; +#[cfg(feature = "native")] +pub use schema_registry_client::SchemaResponse; mod data_type; mod kafka_record; @@ -18,4 +20,3 @@ pub use data_type::Comparable; pub use data_type::DataType; pub use kafka_record::KafkaRecord; pub use schema::SchemaId; -pub use schema_registry_client::SchemaResponse; diff --git a/docs/release/README.md b/docs/release/README.md index d033506..ec33b3f 100644 --- a/docs/release/README.md +++ b/docs/release/README.md @@ -5,8 +5,19 @@ This document explains the release process of the tool. Most of the steps are au 1. Ensure you are on a release branch. 2. Install `cargo-release`: `cargo install cargo-release` -3. Thanks to conventional commits and `cargo-semver-checks`, you can determine the next version to release. -4. Bump the version: `cargo release "" --no-publish --no-confirm --execute --no-tag` +3. Thanks to conventional commits and `cargo-semver-checks`, you can determine the next version to release: + +```bash +cargo semver-checks --color never \ + --package yozefu-lib \ + --package yozefu-app \ + --package yozefu-command \ + --package yozefu-wasm-types \ + --baseline-rev "vX.Y.Z" \ + --release-type "" +``` + +4. Bump the version based on the previous step: `cargo release "" --no-publish --no-confirm --execute --no-tag` 5. [Create the pull request](https://github.com/MAIF/yozefu/compare). 6. If all checks succeed, the pull request will be accepted by a reviewer. 7. When a new release is created, a github action workflow is triggered to update the changelog. The updated changelog will be available on a branch named `changelog/`. A pull request is automatically created with that branch, which must be approved to be merged into `main`. \ No newline at end of file