Skip to content

Commit d99dc84

Browse files
jfrochesamrose
andauthored
feat(wrappers): support more versions (#1831)
* feat(wrappers): add versions 0.4.5, 0.4.6, and 0.5.0 * feat(wrappers): add versions 0.4.3, 0.4.4, 0.5.5 * feat(wrappers): add versions 0.3.0, 0.4.1, 0.4.2 * chore: add release suffix for testing * chore: bump version for release --------- Co-authored-by: Sam Rose <[email protected]>
1 parent a720562 commit d99dc84

File tree

4 files changed

+114
-17
lines changed

4 files changed

+114
-17
lines changed

ansible/vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ postgres_major:
1010

1111
# Full version strings for each major version
1212
postgres_release:
13-
postgresorioledb-17: "17.5.1.045-orioledb"
14-
postgres17: "17.6.1.024"
15-
postgres15: "15.14.1.024"
13+
postgresorioledb-17: "17.5.1.046-orioledb"
14+
postgres17: "17.6.1.025"
15+
postgres15: "15.14.1.025"
1616

1717
# Non Postgres Extensions
1818
pgbouncer_release: 1.19.0

nix/cargo-pgrx/versions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,14 @@
9999
"cargoHash": "sha256-Ny7j56pwB+2eEK62X0nWfFKQy5fBz+Q1oyvecivxLkk="
100100
}
101101
}
102+
},
103+
"0.16.0": {
104+
"hash": "sha256-emNR7fXNVD9sY/Mdno7mwpH6l/7AD28cBUsFRn9je50=",
105+
"rust": {
106+
"1.87.0": {
107+
"cargoHash": "sha256-pK6OxRNubcWhohLvIJIliRtaHSIQOhQp7Q9brPygZYA="
108+
}
109+
}
102110
}
111+
103112
}

nix/ext/versions.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,74 @@
471471
}
472472
},
473473
"wrappers": {
474+
"0.3.0": {
475+
"postgresql": [
476+
"15"
477+
],
478+
"hash": "sha256-ogpF8NJ7kW3Ut8jaKMDiKYIXnI38nfRq2mMK4rqFAIA=",
479+
"pgrx": "0.11.3",
480+
"rust": "1.76.0"
481+
},
482+
"0.4.1": {
483+
"postgresql": [
484+
"15"
485+
],
486+
"hash": "sha256-AU9Y43qEMcIBVBThu+Aor1HCtfFIg+CdkzK9IxVdkzM=",
487+
"pgrx": "0.11.3",
488+
"rust": "1.76.0"
489+
},
490+
"0.4.2": {
491+
"postgresql": [
492+
"15"
493+
],
494+
"hash": "sha256-ut3IQED6ANXgabiHoEUdfSrwkuuYYSpRoeWdtBvSe64=",
495+
"pgrx": "0.11.3",
496+
"rust": "1.76.0"
497+
},
498+
"0.4.3": {
499+
"postgresql": [
500+
"15"
501+
],
502+
"hash": "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=",
503+
"pgrx": "0.12.6",
504+
"rust": "1.80.0"
505+
},
506+
"0.4.4": {
507+
"postgresql": [
508+
"15",
509+
"17"
510+
],
511+
"hash": "sha256-QoGFJpq8PuvMM8SS+VZd7MlNl56uFivRjs1tCtwX+oE=",
512+
"pgrx": "0.12.6",
513+
"rust": "1.80.0"
514+
},
515+
"0.4.5": {
516+
"postgresql": [
517+
"15",
518+
"17"
519+
],
520+
"hash": "sha256-IgDfVFROMCHYLZ/Iqj12MsQjPPCdRoH+3oi3Ki/iaRI=",
521+
"pgrx": "0.12.9",
522+
"rust": "1.81.0"
523+
},
524+
"0.4.6": {
525+
"postgresql": [
526+
"15",
527+
"17"
528+
],
529+
"hash": "sha256-hthb3qEXT1Kf4yPoq0udEbQzlyLtI5tug6sK4YAPFjU=",
530+
"pgrx": "0.12.9",
531+
"rust": "1.84.0"
532+
},
533+
"0.5.0": {
534+
"postgresql": [
535+
"15",
536+
"17"
537+
],
538+
"hash": "sha256-FbRTUcpEHBa5DI6dutvBeahYM0RZVAXIzIAZWIaxvn0=",
539+
"pgrx": "0.12.9",
540+
"rust": "1.84.0"
541+
},
474542
"0.5.4": {
475543
"postgresql": [
476544
"15",
@@ -480,6 +548,16 @@
480548
"hash": "sha256-W1RokXH4Vfj2FIuEzGEP5SzzWsv2Pbzfa816nXKnSoc=",
481549
"pgrx": "0.14.3",
482550
"rust": "1.87.0"
551+
},
552+
"0.5.5": {
553+
"postgresql": [
554+
"15",
555+
"17",
556+
"orioledb-17"
557+
],
558+
"hash": "sha256-tWa1XewJbbqarwWkJPfvCIev7Fn0hLJRzYiz0vuebyA=",
559+
"pgrx": "0.16.0",
560+
"rust": "1.87.0"
483561
}
484562
}
485563
}

nix/ext/wrappers/default.nix

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ let
8383
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
8484
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
8585
}
86+
else if builtins.compareVersions "0.5.4" version == 0 then
87+
{
88+
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
89+
"iceberg-catalog-s3tables-0.5.1" = "sha256-1JkB2JExukABlbW1lZPolNQCYb9URi8xNYY3APmiGq0=";
90+
}
91+
else if builtins.compareVersions "0.5.5" version == 0 then
92+
{
93+
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
94+
"iceberg-catalog-s3tables-0.6.0" = "sha256-AUK7B0wMqQZwJho91woLs8uOC4k1RdUEEN5Khw2OoqQ=";
95+
}
8696
else
8797
{
8898
"clickhouse-rs-1.1.0-alpha.1" = "sha256-nKiGzdsAgJej8NgyVOqHaD1sZLrNF1RPfEhu2pRwZ6o=";
@@ -162,19 +172,6 @@ let
162172
}
163173
);
164174
previouslyPackagedVersions = [
165-
"0.5.3"
166-
"0.5.2"
167-
"0.5.1"
168-
"0.5.0"
169-
"0.4.6"
170-
"0.4.5"
171-
"0.4.4"
172-
"0.4.3"
173-
"0.4.2"
174-
"0.4.1"
175-
"0.4.0"
176-
"0.3.1"
177-
"0.3.0"
178175
"0.2.0"
179176
"0.1.19"
180177
"0.1.18"
@@ -214,6 +211,7 @@ buildEnv {
214211
"/share/postgresql/extension"
215212
];
216213
postBuild = ''
214+
217215
create_control_files() {
218216
# Create main control file pointing to latest version
219217
{
@@ -233,6 +231,19 @@ buildEnv {
233231
}
234232
235233
create_migration_sql_files() {
234+
PREVIOUS_VERSION=""
235+
while IFS= read -r i; do
236+
FILENAME=$(basename "$i")
237+
DIRNAME=$(dirname "$i")
238+
VERSION="$(grep -oE '[0-9]+\.[0-9]+\.[0-9]+' <<< $FILENAME)"
239+
if [[ "$PREVIOUS_VERSION" != "" ]]; then
240+
echo "Processing $i"
241+
MIGRATION_FILENAME="$DIRNAME/''${FILENAME/$VERSION/$PREVIOUS_VERSION--$VERSION}"
242+
cp "$i" "$MIGRATION_FILENAME"
243+
fi
244+
PREVIOUS_VERSION="$VERSION"
245+
done < <(find $out -name '*.sql' | sort -V)
246+
236247
# Create migration SQL files from previous versions to newer versions
237248
for prev_version in ${lib.concatStringsSep " " previouslyPackagedVersions}; do
238249
for curr_version in ${lib.concatStringsSep " " versions}; do
@@ -252,7 +263,6 @@ buildEnv {
252263
create_lib_files
253264
create_migration_sql_files
254265
255-
# checks
256266
(test "$(ls -A $out/lib/${pname}*${postgresql.dlSuffix} | wc -l)" = "${
257267
toString (numberOfVersions + numberOfPreviouslyPackagedVersions + 1)
258268
}")

0 commit comments

Comments
 (0)