Skip to content

Commit 4635f12

Browse files
authored
Make update-versions update package versions (#430)
Signed-off-by: Ana Hobden <[email protected]>
1 parent 1dcb1e2 commit 4635f12

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

update-versions.sh

+18
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ set -ex
1212
HEAD=$(git rev-parse HEAD)
1313
VERSION=$1
1414

15+
CARGO_TOMLS_TO_BUMP=(
16+
./Cargo.toml
17+
./pgx/Cargo.toml
18+
./pgx-utils/Cargo.toml
19+
./pgx-macros/Cargo.toml
20+
./pgx-tests/Cargo.toml
21+
./cargo-pgx/Cargo.toml
22+
./pgx-pg-sys/Cargo.toml
23+
)
24+
1525
CARGO_TOMLS_TO_SED=(
1626
./cargo-pgx/src/templates/cargo_toml
1727
./nix/templates/default/Cargo.toml
@@ -22,6 +32,7 @@ CARGO_TOMLS_TO_SED=(
2232
./cargo-pgx/Cargo.toml
2333
./pgx-pg-sys/Cargo.toml
2434
./pgx-examples/*/Cargo.toml
35+
./Cargo.toml
2536
)
2637

2738
DEPENDENCIES_TO_UPDATE=(
@@ -30,10 +41,17 @@ DEPENDENCIES_TO_UPDATE=(
3041
"pgx-macros"
3142
"pgx-pgx-sys"
3243
"pgx-utils"
44+
"cargo-pgx"
3345
)
3446

3547
for cargo_toml in ${CARGO_TOMLS_TO_SED[@]}; do
3648
for dependency in ${DEPENDENCIES_TO_UPDATE[@]}; do
3749
sed -i'' -E "s/(^${dependency}.*\")[0-9]+\.[0-9]+\.[0-9]+(\".*$)/\1${VERSION}\2/" ${cargo_toml}
3850
done
3951
done
52+
53+
for cargo_toml in ${CARGO_TOMLS_TO_BUMP[@]}; do
54+
sed -i'' -E "s/(^version = \")[0-9]+\.[0-9]+\.[0-9]+(\"$)/\1${VERSION}\2/" ${cargo_toml}
55+
done
56+
57+
cargo generate-lockfile

0 commit comments

Comments
 (0)