From 9f2164fe248d59edd7782b27f9ad6afc28b7c418 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Wed, 2 Mar 2022 10:07:13 -0800 Subject: [PATCH] Release 0.4.0-beta.0 (#461) Signed-off-by: Ana Hobden --- Cargo.lock | 28 ++++++++++++++-------------- cargo-pgx/Cargo.toml | 4 ++-- cargo-pgx/src/templates/cargo_toml | 4 ++-- nix/templates/default/Cargo.toml | 8 ++++---- pgx-examples/bgworker/Cargo.toml | 2 +- pgx-examples/nostd/Cargo.toml | 2 +- pgx-macros/Cargo.toml | 4 ++-- pgx-pg-sys/Cargo.toml | 6 +++--- pgx-tests/Cargo.toml | 8 ++++---- pgx-utils/Cargo.toml | 2 +- pgx/Cargo.toml | 8 ++++---- update-versions.sh | 13 +++++++++---- 12 files changed, 47 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2209500aa..4916c21e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "cargo-pgx" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "cargo_metadata", "cargo_toml", @@ -378,9 +378,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.3" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f8c0e2a6b902acc18214e24a6935cdaf8a8e34231913d4404dcaee659f65a1" +checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312" dependencies = [ "atty", "bitflags", @@ -406,9 +406,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.2" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d42c94ce7c2252681b5fed4d3627cc807b13dfc033246bd05d5b252399000e" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" dependencies = [ "heck", "proc-macro-error", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "pgx" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "atomic-traits", "bitflags", @@ -1527,7 +1527,7 @@ dependencies = [ [[package]] name = "pgx-macros" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "pgx-utils", "proc-macro-crate", @@ -1540,7 +1540,7 @@ dependencies = [ [[package]] name = "pgx-pg-sys" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "bindgen", "build-deps", @@ -1560,7 +1560,7 @@ dependencies = [ [[package]] name = "pgx-tests" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "eyre", "libc", @@ -1579,7 +1579,7 @@ dependencies = [ [[package]] name = "pgx-utils" -version = "0.3.3" +version = "0.4.0-beta.0" dependencies = [ "convert_case", "dirs", @@ -2418,18 +2418,18 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" diff --git a/cargo-pgx/Cargo.toml b/cargo-pgx/Cargo.toml index f5e51df93..e2e212155 100644 --- a/cargo-pgx/Cargo.toml +++ b/cargo-pgx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-pgx" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Cargo subcommand for 'pgx' to make Postgres extension development easy" @@ -22,7 +22,7 @@ semver = "1.0.6" owo-colors = "3.2.0" env_proxy = "0.4.1" num_cpus = "1.13.1" -pgx-utils = { path = "../pgx-utils", version = "0.3.3" } +pgx-utils = { path = "../pgx-utils", version = "0.4.0-beta.0" } proc-macro2 = { version = "1.0.36", features = [ "span-locations" ] } quote = "1.0.15" rayon = "1.5.1" diff --git a/cargo-pgx/src/templates/cargo_toml b/cargo-pgx/src/templates/cargo_toml index 0addd7574..f128f52fa 100644 --- a/cargo-pgx/src/templates/cargo_toml +++ b/cargo-pgx/src/templates/cargo_toml @@ -16,10 +16,10 @@ pg14 = ["pgx/pg14", "pgx-tests/pg14" ] pg_test = [] [dependencies] -pgx = "0.3.3" +pgx = "0.4.0-beta.0" [dev-dependencies] -pgx-tests = "0.3.3" +pgx-tests = "0.4.0-beta.0" [profile.dev] panic = "unwind" diff --git a/nix/templates/default/Cargo.toml b/nix/templates/default/Cargo.toml index a17c6dbcb..ff10b574b 100644 --- a/nix/templates/default/Cargo.toml +++ b/nix/templates/default/Cargo.toml @@ -16,13 +16,13 @@ pg14 = ["pgx/pg14", "pgx-tests/pg14" ] pg_test = [] [dependencies] -pgx = "0.3.3" -pgx-macros = "0.3.3" -pgx-utils = "0.3.3" +pgx = "0.4.0-beta.0" +pgx-macros = "0.4.0-beta.0" +pgx-utils = "0.4.0-beta.0" [dev-dependencies] -pgx-tests = "0.3.3" +pgx-tests = "0.4.0-beta.0" tempfile = "3.2.0" once_cell = "1.7.2" diff --git a/pgx-examples/bgworker/Cargo.toml b/pgx-examples/bgworker/Cargo.toml index ab25a959d..7ab6da23d 100644 --- a/pgx-examples/bgworker/Cargo.toml +++ b/pgx-examples/bgworker/Cargo.toml @@ -32,4 +32,4 @@ pgx-tests = { path = "../../../pgx/pgx-tests" } # panic = "unwind" # opt-level = 3 # lto = "fat" -# codegen-units = 1 \ No newline at end of file +# codegen-units = 1 diff --git a/pgx-examples/nostd/Cargo.toml b/pgx-examples/nostd/Cargo.toml index 22c65820d..2fd000f2c 100644 --- a/pgx-examples/nostd/Cargo.toml +++ b/pgx-examples/nostd/Cargo.toml @@ -31,4 +31,4 @@ pgx-tests = { path = "../../../pgx/pgx-tests" } # panic = "unwind" # opt-level = 3 # lto = "fat" -# codegen-units = 1 \ No newline at end of file +# codegen-units = 1 diff --git a/pgx-macros/Cargo.toml b/pgx-macros/Cargo.toml index a9a75fa52..57ce0bb5a 100644 --- a/pgx-macros/Cargo.toml +++ b/pgx-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-macros" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Proc Macros for 'pgx'" @@ -18,7 +18,7 @@ proc-macro = true rustc-args = ["--cfg", "docsrs"] [dependencies] -pgx-utils = { path = "../pgx-utils", version = "0.3.3" } +pgx-utils = { path = "../pgx-utils", version = "0.4.0-beta.0" } proc-macro2 = "1.0.36" quote = "1.0.15" syn = { version = "1.0.86", features = [ "extra-traits", "full", "fold", "parsing" ] } diff --git a/pgx-pg-sys/Cargo.toml b/pgx-pg-sys/Cargo.toml index c239d6953..8e7fa2156 100644 --- a/pgx-pg-sys/Cargo.toml +++ b/pgx-pg-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-pg-sys" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Generated Rust bindings for Postgres internals, for use with 'pgx'" @@ -29,14 +29,14 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] memoffset = "0.6.5" once_cell = "1.9.0" -pgx-macros = { path = "../pgx-macros/", version = "0.3.3" } +pgx-macros = { path = "../pgx-macros/", version = "0.4.0-beta.0" } [build-dependencies] bindgen = { version = "0.59.2", default-features = false, features = ["runtime"] } build-deps = "0.1.4" owo-colors = "3.2.0" num_cpus = "1.13.1" -pgx-utils = { path = "../pgx-utils/", version = "0.3.3" } +pgx-utils = { path = "../pgx-utils/", version = "0.4.0-beta.0" } proc-macro2 = "1.0.36" quote = "1.0.15" rayon = "1.5.1" diff --git a/pgx-tests/Cargo.toml b/pgx-tests/Cargo.toml index f1faa6931..64b959534 100644 --- a/pgx-tests/Cargo.toml +++ b/pgx-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-tests" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Test framework for 'pgx'-based Postgres extensions" @@ -30,9 +30,9 @@ no-default-features = true owo-colors = "3.2.0" once_cell = "1.9.0" libc = "0.2.119" -pgx = { path = "../pgx", default-features = false, version= "0.3.3" } -pgx-macros = { path = "../pgx-macros", version= "0.3.3" } -pgx-utils = { path = "../pgx-utils", version= "0.3.3" } +pgx = { path = "../pgx", default-features = false, version= "0.4.0-beta.0" } +pgx-macros = { path = "../pgx-macros", version= "0.4.0-beta.0" } +pgx-utils = { path = "../pgx-utils", version= "0.4.0-beta.0" } postgres = "0.19.2" regex = "1.5.4" serde = "1.0.136" diff --git a/pgx-utils/Cargo.toml b/pgx-utils/Cargo.toml index 4783149c5..958a0cdbc 100644 --- a/pgx-utils/Cargo.toml +++ b/pgx-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-utils" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Utility functions for 'pgx'" diff --git a/pgx/Cargo.toml b/pgx/Cargo.toml index 348dbc158..218bba0b3 100644 --- a/pgx/Cargo.toml +++ b/pgx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx" -version = "0.3.3" +version = "0.4.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "pgx: A Rust framework for creating Postgres extensions" @@ -34,9 +34,9 @@ cstr_core = "0.2.5" enum-primitive-derive = "0.2.2" num-traits = "0.2.14" seahash = "4.1.0" -pgx-macros = { path = "../pgx-macros/", version = "0.3.3" } -pgx-pg-sys = { path = "../pgx-pg-sys", version = "0.3.3" } -pgx-utils = { path = "../pgx-utils/", version = "0.3.3" } +pgx-macros = { path = "../pgx-macros/", version = "0.4.0-beta.0" } +pgx-pg-sys = { path = "../pgx-pg-sys", version = "0.4.0-beta.0" } +pgx-utils = { path = "../pgx-utils/", version = "0.4.0-beta.0" } serde = { version = "1.0.136", features = [ "derive" ] } serde_cbor = "0.11.2" serde_json = "1.0.79" diff --git a/update-versions.sh b/update-versions.sh index 0477088f4..55b49d01c 100755 --- a/update-versions.sh +++ b/update-versions.sh @@ -1,6 +1,7 @@ #! /usr/bin/env bash -# requires: https://github.com/sunng87/cargo-release +# requires: +# * ripgrep if [ "x$1" == "x" ]; then echo "usage: ./update-verions.sh " @@ -44,14 +45,18 @@ DEPENDENCIES_TO_UPDATE=( "cargo-pgx" ) +SEMVER_REGEX="(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?" + for cargo_toml in ${CARGO_TOMLS_TO_SED[@]}; do for dependency in ${DEPENDENCIES_TO_UPDATE[@]}; do - sed -i'' -E "s/(^${dependency}.*\")[0-9]+\.[0-9]+\.[0-9]+(\".*$)/\1${VERSION}\2/" ${cargo_toml} + rg --passthru -N "(?P^${dependency}.*\")${SEMVER_REGEX}(?P\".*$)" -r "\${prefix}${VERSION}\${postfix}" ${cargo_toml} > ${cargo_toml}.tmp || true + mv ${cargo_toml}.tmp ${cargo_toml} done done for cargo_toml in ${CARGO_TOMLS_TO_BUMP[@]}; do - sed -i'' -E "s/(^version = \")[0-9]+\.[0-9]+\.[0-9]+(\"$)/\1${VERSION}\2/" ${cargo_toml} + rg --passthru -N "(?P^version = \")${SEMVER_REGEX}(?P\"$)" -r "\${prefix}${VERSION}\${postfix}" ${cargo_toml} > ${cargo_toml}.tmp || true + mv ${cargo_toml}.tmp ${cargo_toml} done cargo generate-lockfile @@ -62,4 +67,4 @@ for example in ./pgx-examples/*/; do popd done -PGX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE=1 cargo test --no-run --workspace --features "pg14 pg_test" +PGX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE=1 cargo test --no-run --workspace --no-default-features --features "pg14"