From 7723c08be6283f652891be014d6e64e740d0c53f Mon Sep 17 00:00:00 2001 From: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:36:43 -0400 Subject: [PATCH 1/3] chore: Updates near-cli-rs and cargo-near in the new project template to latest versions (#168) `cargo near new` creates a new contract from template with pre-populated git workflows. It seems the versions of near-cli-rs and cargo-near are no longer compatible, getting error: ``` Error: 0: expected `schema_version` to be ~0.3, but got 0.4.0: consider upgrading near-abi to a newer version ``` This pull request updates these two packages to latest versions. I've validated a successful deploy after modified workflows here: https://github.com/NEARBuilders/gateway/pull/457#issuecomment-2204429774 --- .../.github/workflows/deploy-production.yml | 2 +- .../new-project-template/.github/workflows/deploy-staging.yml | 4 ++-- .../.github/workflows/undeploy-staging.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-production.yml b/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-production.yml index 80623177..f79ba718 100644 --- a/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-production.yml +++ b/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-production.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install cargo-near CLI - run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.4.1/cargo-near-installer.sh | sh + run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.6.2/cargo-near-installer.sh | sh - name: Deploy to production run: | cargo near deploy "${{ vars.NEAR_CONTRACT_PRODUCTION_ACCOUNT_ID }}" \ diff --git a/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-staging.yml b/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-staging.yml index d61228da..5ddc7831 100644 --- a/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-staging.yml +++ b/cargo-near/src/commands/new/new-project-template/.github/workflows/deploy-staging.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Install near CLI - run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.7.0/near-cli-rs-installer.sh | sh + run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.11.1/near-cli-rs-installer.sh | sh - name: Create staging account if: github.event.action == 'opened' || github.event.action == 'reopened' run: | @@ -34,7 +34,7 @@ jobs: send - name: Install cargo-near CLI - run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.4.1/cargo-near-installer.sh | sh + run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.6.2/cargo-near-installer.sh | sh - name: Deploy to staging run: | cargo near deploy "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" \ diff --git a/cargo-near/src/commands/new/new-project-template/.github/workflows/undeploy-staging.yml b/cargo-near/src/commands/new/new-project-template/.github/workflows/undeploy-staging.yml index 48a8fc7a..f7d3186b 100644 --- a/cargo-near/src/commands/new/new-project-template/.github/workflows/undeploy-staging.yml +++ b/cargo-near/src/commands/new/new-project-template/.github/workflows/undeploy-staging.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install near CLI - run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.7.0/near-cli-rs-installer.sh | sh + run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.11.1/near-cli-rs-installer.sh | sh - name: Remove staging account run: | near account delete-account "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" \ From 4df8bf90c77dd8a60b2ac3460df1e03a2455a0b2 Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Fri, 5 Jul 2024 12:26:05 +0200 Subject: [PATCH 2/3] chore: release v0.6.3 (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🤖 New release * `cargo-near`: 0.6.2 -> 0.6.3
Changelog

## [0.6.3](https://github.com/near/cargo-near/compare/cargo-near-v0.6.2...cargo-near-v0.6.3) - 2024-07-03 ### Added - Support passing feature flags to `cargo` invocation ([#160](https://github.com/near/cargo-near/pull/160)) ### Fixed - Also pass feature flags to ABI build step ([#161](https://github.com/near/cargo-near/pull/161)) ### Other - Updates near-cli-rs and cargo-near in the new project template to latest versions ([#168](https://github.com/near/cargo-near/pull/168)) - Updated dependencies to the latest versions ([#167](https://github.com/near/cargo-near/pull/167)) - Updated "interactive_clap" to 0.2.10 (updated "flatten" parameter) ([#154](https://github.com/near/cargo-near/pull/154))

--- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --- CHANGELOG.md | 13 +++++++++++++ Cargo.lock | 4 ++-- cargo-near/Cargo.toml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804fe644..1330ff73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.3](https://github.com/near/cargo-near/compare/cargo-near-v0.6.2...cargo-near-v0.6.3) - 2024-07-03 + +### Added +- Support passing feature flags to `cargo` invocation ([#160](https://github.com/near/cargo-near/pull/160)) + +### Fixed +- Also pass feature flags to ABI build step ([#161](https://github.com/near/cargo-near/pull/161)) + +### Other +- Updates near-cli-rs and cargo-near in the new project template to latest versions ([#168](https://github.com/near/cargo-near/pull/168)) +- Updated dependencies to the latest versions ([#167](https://github.com/near/cargo-near/pull/167)) +- Updated "interactive_clap" to 0.2.10 (updated "flatten" parameter) ([#154](https://github.com/near/cargo-near/pull/154)) + ## [0.6.2](https://github.com/near/cargo-near/compare/cargo-near-v0.6.1...cargo-near-v0.6.2) - 2024-04-14 ### Added diff --git a/Cargo.lock b/Cargo.lock index 7ce865e0..4f04a47b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -817,7 +817,7 @@ dependencies = [ [[package]] name = "cargo-near" -version = "0.6.2" +version = "0.6.3" dependencies = [ "atty", "bs58 0.5.1", @@ -855,7 +855,7 @@ version = "0.1.0" dependencies = [ "borsh", "camino", - "cargo-near 0.6.2", + "cargo-near 0.6.3", "color-eyre", "const_format", "function_name", diff --git a/cargo-near/Cargo.toml b/cargo-near/Cargo.toml index dbc6bed1..eeb83824 100644 --- a/cargo-near/Cargo.toml +++ b/cargo-near/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-near" -version = "0.6.2" +version = "0.6.3" authors = ["Near Inc "] edition = "2021" rust-version = "1.76.0" From 1245f573585cb1695e59f458509553df3eb290e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= <26653921+dj8yfo@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:55:02 +0300 Subject: [PATCH 3/3] test: Updated integration tests to use latest near-sdk-rs 5.2.1 (#171) --- integration-tests/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 9374935e..a9df6bf6 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -2,7 +2,7 @@ pub mod from_crates_io { use const_format::formatcp; - pub const SDK_VERSION: &str = "5.0.0-alpha.2"; + pub const SDK_VERSION: &str = "5.2.1"; pub const SDK_VERSION_TOML: &str = formatcp!(r#"version = "{SDK_VERSION}""#); } @@ -10,8 +10,8 @@ pub mod from_crates_io { pub mod from_git { use const_format::formatcp; - pub const SDK_VERSION: &str = "5.0.0-alpha.2"; - pub const SDK_REVISION: &str = "5d340f2f8e3fec3da875043adb67466f65a5d1ac"; + pub const SDK_VERSION: &str = "5.2.1"; + pub const SDK_REVISION: &str = "5c9eaeaad596f42df7002446beca63f819791c5f"; pub const SDK_SHORT_VERSION_TOML: &str = formatcp!(r#"version = "{SDK_VERSION}""#); pub const SDK_REPO: &str = "https://github.com/near/near-sdk-rs.git"; pub const SDK_VERSION_TOML: &str =