Skip to content

Commit ec5c06f

Browse files
committed
PostgreSQL: include contrib modules in Linux build
1 parent 3b71f24 commit ec5c06f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

postgresqlupdates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"UpdateSourcePlatform": "Linux",
2323
"UpdateSource": "Executable",
2424
"UpdateSourceData": "/bin/bash",
25-
"UpdateSourceArgs": "-c \"PostgreSQLRelease=\\\"{{ServerVersion}}\\\"; PostgreSQLVersion=\\\"{{CustomServerVersion}}\\\"; cd postgresql && if [[ -x pgsql/bin/postgres ]]; then InstalledVersion=$(pgsql/bin/postgres -V | sed \\\"s/.*(PostgreSQL) \\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/\\\"); else InstalledVersion=\\\"\\\"; fi; [[ -z \\\"$PostgreSQLVersion\\\" ]] && { LatestMinor=$(wget -qO- https://www.postgresql.org/versions.json | jq -r \\\".[] | select(.major == \\\\\\\"$PostgreSQLRelease\\\\\\\") | .latestMinor\\\") && PostgreSQLVersion=\\\"$PostgreSQLRelease.${LatestMinor}\\\"; }; if [[ ! \\\"$PostgreSQLVersion\\\" =~ ^(13|14|15|16|17|18)\\.[0-9]+$ ]]; then echo \\\"Invalid PostgreSQL version format specified\\\" && exit 1; elif [[ \\\"$InstalledVersion\\\" == \\\"$PostgreSQLVersion\\\" ]]; then echo \\\"PostgreSQL v$PostgreSQLVersion already installed. Skipping\\\" && exit 0; else [[ -f postgresql.tar.gz ]] && rm -f postgresql.tar.gz >/dev/null 2>&1; mkdir -p build >/dev/null; cd build && rm -rf ./* >/dev/null 2>&1 && wget -qO postgresql.tar.gz https://ftp.postgresql.org/pub/source/v$PostgreSQLVersion/postgresql-$PostgreSQLVersion.tar.gz || { echo \\\"Download failed from the PostgreSQL CDN. This is a fault with the CDN, not AMP. Aborting\\\"; cd .. && rm -rf build >/dev/null 2>&1; exit 1; }; tar -xzf postgresql.tar.gz --strip-components=1 >/dev/null 2>&1 && rm -f postgresql.tar.gz >/dev/null 2>&1 && echo \\\"PostgreSQL v$PostgreSQLVersion downloaded\\\" && echo \\\"Building PostgreSQL from source. This will take a while\\\" && { [[ -d ../pgsql ]] && mv -f ../pgsql ../pgsql-bak >/dev/null 2>&1 || true; } && mkdir -p ../pgsql >/dev/null 2>&1 && { ./configure --prefix=\\\"{{$FullBaseDir}}pgsql\\\" >/dev/null && make -j4 >/dev/null && make install >/dev/null && cd .. && rm -rf build pgsql-bak >/dev/null 2>&1 && echo \\\"Done\\\"; } || { cd .. && rm -rf build pgsql >/dev/null 2>&1 && { [[ -d pgsql-bak ]] && mv -f pgsql-bak pgsql >/dev/null 2>&1 || true; } && echo \\\"Building PostgreSQL failed. Aborting\\\"; exit 1; }; fi\"",
25+
"UpdateSourceArgs": "-c \"PostgreSQLRelease=\\\"{{ServerVersion}}\\\"; PostgreSQLVersion=\\\"{{CustomServerVersion}}\\\"; cd postgresql && if [[ -x pgsql/bin/postgres ]]; then InstalledVersion=$(pgsql/bin/postgres -V | sed \\\"s/.*(PostgreSQL) \\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/\\\"); else InstalledVersion=\\\"\\\"; fi; [[ -z \\\"$PostgreSQLVersion\\\" ]] && { LatestMinor=$(wget -qO- https://www.postgresql.org/versions.json | jq -r \\\".[] | select(.major == \\\\\\\"$PostgreSQLRelease\\\\\\\") | .latestMinor\\\") && PostgreSQLVersion=\\\"$PostgreSQLRelease.${LatestMinor}\\\"; }; if [[ ! \\\"$PostgreSQLVersion\\\" =~ ^(13|14|15|16|17|18)\\.[0-9]+$ ]]; then echo \\\"Invalid PostgreSQL version format specified\\\" && exit 1; elif [[ \\\"$InstalledVersion\\\" == \\\"$PostgreSQLVersion\\\" ]]; then echo \\\"PostgreSQL v$PostgreSQLVersion already installed. Skipping\\\" && exit 0; else [[ -f postgresql.tar.gz ]] && rm -f postgresql.tar.gz >/dev/null 2>&1; mkdir -p build >/dev/null; cd build && rm -rf ./* >/dev/null 2>&1 && wget -qO postgresql.tar.gz https://ftp.postgresql.org/pub/source/v$PostgreSQLVersion/postgresql-$PostgreSQLVersion.tar.gz || { echo \\\"Download failed from the PostgreSQL CDN. This is a fault with the CDN, not AMP. Aborting\\\"; cd .. && rm -rf build >/dev/null 2>&1; exit 1; }; tar -xzf postgresql.tar.gz --strip-components=1 >/dev/null 2>&1 && rm -f postgresql.tar.gz >/dev/null 2>&1 && echo \\\"PostgreSQL v$PostgreSQLVersion downloaded\\\" && echo \\\"Building PostgreSQL from source. This will take a while\\\" && { [[ -d ../pgsql ]] && mv -f ../pgsql ../pgsql-bak >/dev/null 2>&1 || true; } && mkdir -p ../pgsql >/dev/null 2>&1 && { ./configure --prefix=\\\"{{$FullBaseDir}}pgsql\\\" >/dev/null && make world-bin -j4 >/dev/null && make install-world-bin >/dev/null && cd .. && rm -rf build pgsql-bak >/dev/null 2>&1 && echo \\\"Done\\\"; } || { cd .. && rm -rf build pgsql >/dev/null 2>&1 && { [[ -d pgsql-bak ]] && mv -f pgsql-bak pgsql >/dev/null 2>&1 || true; } && echo \\\"Building PostgreSQL failed. Aborting\\\"; exit 1; }; fi\"",
2626
"SkipOnFailure": false
2727
},
2828
{

0 commit comments

Comments
 (0)