diff --git a/Cargo.lock b/Cargo.lock index b2508ed731..253b36800c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3844,7 +3844,7 @@ dependencies = [ [[package]] name = "spacetimedb" -version = "0.4.1" +version = "0.5.0" dependencies = [ "bytes", "log", @@ -3858,7 +3858,7 @@ dependencies = [ [[package]] name = "spacetimedb-bench" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "byte-unit", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "spacetimedb-bindings-macro" -version = "0.4.1" +version = "0.5.0" dependencies = [ "humantime", "proc-macro2", @@ -3888,14 +3888,14 @@ dependencies = [ [[package]] name = "spacetimedb-bindings-sys" -version = "0.4.1" +version = "0.5.0" dependencies = [ "getrandom", ] [[package]] name = "spacetimedb-cli" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "base64 0.13.1", @@ -3928,7 +3928,7 @@ dependencies = [ [[package]] name = "spacetimedb-client-api" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "async-trait", @@ -3953,7 +3953,7 @@ dependencies = [ "tempdir", "tokio", "tokio-stream", - "tokio-tungstenite 0.18.0", + "tokio-tungstenite", ] [[package]] @@ -3967,7 +3967,7 @@ dependencies = [ [[package]] name = "spacetimedb-client-sdk" -version = "0.1.0" +version = "0.5.0" dependencies = [ "anyhow", "anymap", @@ -3981,12 +3981,12 @@ dependencies = [ "spacetimedb-lib", "spacetimedb-sats", "tokio", - "tokio-tungstenite 0.19.0", + "tokio-tungstenite", ] [[package]] name = "spacetimedb-core" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "async-trait", @@ -4060,7 +4060,7 @@ dependencies = [ [[package]] name = "spacetimedb-lib" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "bytes", @@ -4089,7 +4089,7 @@ dependencies = [ [[package]] name = "spacetimedb-sats" -version = "0.4.1" +version = "0.5.0" dependencies = [ "arrayvec", "bytes", @@ -4106,7 +4106,7 @@ dependencies = [ [[package]] name = "spacetimedb-standalone" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "async-trait", @@ -4631,25 +4631,13 @@ name = "tokio-tungstenite" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.18.0", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" dependencies = [ "futures-util", "log", "native-tls", "tokio", "tokio-native-tls", - "tungstenite 0.19.0", + "tungstenite", ] [[package]] @@ -4838,25 +4826,6 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", "native-tls", "rand 0.8.5", "sha1", diff --git a/crates/bench/Cargo.toml b/crates/bench/Cargo.toml index 5b948c4011..a62d9ab2c7 100644 --- a/crates/bench/Cargo.toml +++ b/crates/bench/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-bench" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "Bench library/utility for SpacetimeDB" diff --git a/crates/bindings-macro/Cargo.toml b/crates/bindings-macro/Cargo.toml index 0e6198c402..a26b9f6231 100644 --- a/crates/bindings-macro/Cargo.toml +++ b/crates/bindings-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-bindings-macro" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "Easy support for interacting between SpacetimeDB and Rust." diff --git a/crates/bindings-sys/Cargo.toml b/crates/bindings-sys/Cargo.toml index 7a96eea742..d4e90119f4 100644 --- a/crates/bindings-sys/Cargo.toml +++ b/crates/bindings-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-bindings-sys" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "Easy support for interacting between SpacetimeDB and Rust." diff --git a/crates/bindings/Cargo.toml b/crates/bindings/Cargo.toml index dc85dca040..87d381dacb 100644 --- a/crates/bindings/Cargo.toml +++ b/crates/bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "Easy support for interacting between SpacetimeDB and Rust." @@ -16,9 +16,9 @@ bench = false getrandom = ["spacetimedb-bindings-sys/getrandom"] [dependencies] -spacetimedb-bindings-sys = { path = "../bindings-sys", version = "0.4.1" } -spacetimedb-lib = { path = "../lib", default-features = false, version = "0.4.1"} -spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.4.1"} +spacetimedb-bindings-sys = { path = "../bindings-sys", version = "0.5.0" } +spacetimedb-lib = { path = "../lib", default-features = false, version = "0.5.0"} +spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.5.0"} once_cell = "1.15.0" scoped-tls = "1.0.1" log = "0.4.17" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index cd1b6afe0b..05a11a35ea 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-cli" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "A command line interface for SpacetimeDB" @@ -26,7 +26,7 @@ serde_json = { version = "1.0", features = ["raw_value", "preserve_order"] } toml = "0.5" dirs = "4.0" tabled = "0.8.0" -spacetimedb-lib = { path = "../lib", version = "0.4.1" } +spacetimedb-lib = { path = "../lib", version = "0.5.0" } convert_case = "0.6.0" wasmtime = { version = "7", default-features = false, features = ["cranelift"] } colored = "2.0.0" diff --git a/crates/cli/src/subcommands/project/Cargo._toml b/crates/cli/src/subcommands/project/Cargo._toml index 9016f2c8f4..2b13e84a35 100644 --- a/crates/cli/src/subcommands/project/Cargo._toml +++ b/crates/cli/src/subcommands/project/Cargo._toml @@ -9,5 +9,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -spacetimedb = "0.4.1" +spacetimedb = "0.5.0" log = "0.4" \ No newline at end of file diff --git a/crates/client-api/Cargo.toml b/crates/client-api/Cargo.toml index eebf2ea680..c4ee9b9e73 100644 --- a/crates/client-api/Cargo.toml +++ b/crates/client-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-client-api" -version = "0.4.1" +version = "0.5.0" edition = "2021" publish = false diff --git a/crates/client-sdk/Cargo.toml b/crates/client-sdk/Cargo.toml index db34a29e99..ffbae785e5 100644 --- a/crates/client-sdk/Cargo.toml +++ b/crates/client-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-client-sdk" -version = "0.1.0" +version = "0.5.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 4342541178..3cefebc5a1 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-core" -version = "0.4.1" +version = "0.5.0" edition = "2021" publish = false diff --git a/crates/lib/Cargo.toml b/crates/lib/Cargo.toml index b4bd70f223..83bf71aa47 100644 --- a/crates/lib/Cargo.toml +++ b/crates/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-lib" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "A common library for SpacetimeDB" @@ -25,8 +25,8 @@ hex = "0.4.3" thiserror = "1.0.37" itertools = "0.10.5" anyhow = "1.0.68" -spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.4.1" } -spacetimedb-sats = { path = "../sats", version = "0.4.1" } +spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.5.0" } +spacetimedb-sats = { path = "../sats", version = "0.5.0" } serde_with = { version = "2.2.0", optional = true } chrono = { version = "0.4.23", optional = true, default-features = false } diff --git a/crates/sats/Cargo.toml b/crates/sats/Cargo.toml index 08c88e7ec3..6e9a6b497e 100644 --- a/crates/sats/Cargo.toml +++ b/crates/sats/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-sats" -version = "0.4.1" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "Spacetime Algebraic Type Notation" @@ -14,7 +14,7 @@ serde = ["dep:serde", "hex"] decorum = { version = "0.3.1", default-features = false, features = ["std"] } enum-as-inner = "0.6" serde = { version = "1.0.136", optional = true } -spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.4.1" } +spacetimedb-bindings-macro = { path = "../bindings-macro", version = "0.5.0" } hex = { version = "0.4.3", optional = true } itertools = "0.10.5" thiserror = "1.0.38" diff --git a/crates/standalone/Cargo.toml b/crates/standalone/Cargo.toml index b162b19e15..9f2de803ea 100644 --- a/crates/standalone/Cargo.toml +++ b/crates/standalone/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-standalone" -version = "0.4.1" +version = "0.5.0" edition = "2021" publish = false diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index c78e501bb8..d3980acf39 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -6,10 +6,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -spacetimedb-lib = { path = "../lib", version = "0.4.1" } -spacetimedb-core = { path = "../core", version = "0.4.1" } -spacetimedb-standalone = { path = "../standalone", version = "0.4.1" } -spacetimedb-client-api = { path = "../client-api", version = "0.4.1" } +spacetimedb-lib = { path = "../lib", version = "0.5.0" } +spacetimedb-core = { path = "../core", version = "0.5.0" } +spacetimedb-standalone = { path = "../standalone", version = "0.5.0" } +spacetimedb-client-api = { path = "../client-api", version = "0.5.0" } tokio = { version = "1.25", features = ["full"]} anyhow = "1.0" diff --git a/tools/upgrade-version.sh b/tools/upgrade-version.sh new file mode 100755 index 0000000000..a353d41cb3 --- /dev/null +++ b/tools/upgrade-version.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +set -euo pipefail + +if [ $# != 1 ] ; then + echo "Incorrect number of arguments. Expected: 1 Received: $#" + exit 1 +fi + +fsed() { + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i.sed_bak "$@" + rm -f "$2.sed_bak" + else + sed -i "$@" + fi +} + +version="$1" +declare -a crates=("bench" "bindings" "bindings-macro" "bindings-sys" "client-api-messages" "cli" "client-api" "core" "lib" "sats" "standalone" "testing") +upgrade_version() { + toml=crates/$1/Cargo.toml + if [ ! -f "$toml" ] ; then + echo "Invalid crate: $1" + exit 1 + fi + + # Upgrade the crate version + if [[ $# -lt 2 ]] || [ "$2" != "--skip-version" ] ; then + fsed '3s/.*version.*/version = "'"${version}"'"/' "${toml}" + fi + + # Upgrade any dependencies + for crate in "${crates[@]}" ; do + if [[ $# -lt 2 ]] || [ "$2" != "--no-include-version" ] ; then + fsed 's/.*'"spacetimedb-${crate}"'\s*=.*/'"spacetimedb-${crate}"' = { path = "..\/'"${crate}"'", version = "'"$version"'" }/' "${toml}" + else + fsed 's/.*'"spacetimedb-${crate}"'\s*=.*/'"spacetimedb-${crate}"' = { path = "..\/'"${crate}"'" }/' "${toml}" + fi + done +} + +upgrade_version bench --no-include-version +upgrade_version client-api --no-include-version +upgrade_version core --no-include-version +upgrade_version standalone --no-include-version + +upgrade_version bindings +upgrade_version bindings-macro +upgrade_version bindings-sys +upgrade_version cli +upgrade_version lib +upgrade_version sats +upgrade_version client-sdk + +upgrade_version testing --skip-version + +# Upgrade the template that is shipped with the cli +fsed 's@.*spacetimedb.*=.*".*".*@spacetimedb = "'"${version}"'"@' "crates/cli/src/subcommands/project/Cargo._toml" +fsed 's@.*spacetimedb-lib.*=.*@spacetimedb-lib = { path = "../lib", default-features = false }@' "crates/bindings/Cargo.toml" +fsed 's@.*spacetimedb-bindings-macro.*=.*@spacetimedb-bindings-macro = { path = "../bindings-macro" }@' "crates/bindings/Cargo.toml" + +# Maintain any other options +fsed 's@.*spacetimedb-lib.*=.*@spacetimedb-lib = { path = "../lib", default-features = false, version = "'"$version"'"}@' "crates/bindings/Cargo.toml" +fsed 's@.*spacetimedb-bindings-macro.*=.*@spacetimedb-bindings-macro = { path = "../bindings-macro", version = "'"$version"'"}@' "crates/bindings/Cargo.toml" + +cargo check + +printf "Upgrade to version %s was successful.\n\n" "${version}"