Skip to content

Commit

Permalink
Merge pull request #211 from digicatapult/feat/new-versioning
Browse files Browse the repository at this point in the history
new versioning strategy
  • Loading branch information
Ellenn-A authored Nov 27, 2024
2 parents a87ccf5 + a7e213f commit caac142
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 23 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "12.0.0"

[workspace.dependencies]
##############################
Expand Down
2 changes: 1 addition & 1 deletion Upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ If tests pass, bump at least a minor version in the pallet `Cargo.toml` e.g. `pa

Test that the upgraded dependencies work for the runtime, including the newly upgraded pallets `cargo build --release -p sqnc-runtime`. Fix any compilation errors.

Bump the runtime version in `runtime/Cargo.toml`. Also increment the runtime `spec_version` in `runtime/src/lib.rs` to match. Note `spec_version` does not recognize semver, so treat it as a whole number. e.g. in place of `5.6.8` the `spec_version` would be `568`.
Bump the version in top-level `Cargo.toml`. Also increment the runtime `spec_version` in `runtime/src/lib.rs` by one.

Run the tests for the runtime:

Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = '2021'
license = 'Apache-2.0'
repository = 'https://github.com/digicatapult/sqnc-node/'
name = 'sqnc-node'
version = '11.4.1'
version = { workspace = true }

[[bin]]
name = 'sqnc-node'
Expand Down
2 changes: 1 addition & 1 deletion pallets/doas/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-doas"
version = "2.3.1"
version = { workspace = true }
authors = [
"Digital Catapult <https://www.digicatapult.org.uk>",
"Parity Technologies <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion pallets/process-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = '2021'
license = 'Apache-2.0'
repository = 'https://github.com/digicatapult/sqnc-node/'
name = 'pallet-process-validation'
version = "3.7.1"
version = { workspace = true }

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
2 changes: 1 addition & 1 deletion pallets/symmetric-key/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = '2021'
license = 'Apache-2.0'
repository = 'https://github.com/digicatapult/sqnc-node/'
name = 'pallet-symmetric-key'
version = "2.3.1"
version = { workspace = true }

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
2 changes: 1 addition & 1 deletion pallets/traits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqnc-pallet-traits"
version = "3.5.1"
version = { workspace = true }
edition = "2021"
authors = ['Digital Catapult <https://www.digicatapult.org.uk>']
license = 'Apache-2.0'
Expand Down
2 changes: 1 addition & 1 deletion pallets/transaction-payment-free/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-transaction-payment-free"
version = "2.3.1"
version = { workspace = true }
authors = [
"Digital Catapult <https://www.digicatapult.org.uk>",
"Parity Technologies <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion pallets/utxo-nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = '2021'
license = 'Apache-2.0'
repository = 'https://github.com/digicatapult/sqnc-node/'
name = 'pallet-utxo-nft'
version = "6.4.1"
version = { workspace = true }

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqnc-runtime"
version = "11.3.1"
version = { workspace = true }
authors = ["Digital Catapult <https://www.digicatapult.org.uk>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("sqnc"),
impl_name: create_runtime_str!("sqnc"),
authoring_version: 1,
spec_version: 1131,
spec_version: 1132,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
2 changes: 1 addition & 1 deletion runtime/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = '2021'
license = 'Apache-2.0'
repository = 'https://github.com/digicatapult/sqnc-node/'
name = 'sqnc-runtime-types'
version = "1.1.1"
version = { workspace = true }

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function assert_tomlq() {

function get_working_copy_version() {
assert_tomlq
CURRENT_VERSION=$(tomlq .package.version ./node/Cargo.toml | sed 's/"//g')
CURRENT_VERSION=$(tomlq .workspace.package.version ./Cargo.toml | sed 's/"//g')

printf "This version found to be %s\n" "$CURRENT_VERSION"

Expand Down
2 changes: 1 addition & 1 deletion tools/lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sqnc-lang"
authors = ['Digital Catapult <https://www.digicatapult.org.uk>']
version = "0.5.1"
version = { workspace = true }
edition = "2021"

[lib]
Expand Down

0 comments on commit caac142

Please sign in to comment.