Skip to content

Commit

Permalink
Added experimental support for Postgres 17 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 1, 2023
1 parent e0d8b58 commit 06188b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ host all all ::1/128 md5

const defaultVersion = 14;
const postgresVersion = parseFloat(process.env['INPUT_POSTGRES-VERSION'] || defaultVersion);
if (![16, 15, 14, 13, 12, 11, 10, 9.6].includes(postgresVersion)) {
if (![17, 16, 15, 14, 13, 12, 11, 10, 9.6].includes(postgresVersion)) {
throw `Postgres version not supported: ${postgresVersion}`;
}

Expand Down Expand Up @@ -111,8 +111,8 @@ if (isMac()) {
// beta versions require extra component
// development snapshots require this and -snapshot after pgdg
// https://wiki.postgresql.org/wiki/Apt/FAQ
const suffix = postgresVersion == 16 ? ` ${postgresVersion}` : "";
const snapshot = postgresVersion == 16 ? `-snapshot` : "";
const suffix = postgresVersion >= 16 ? ` ${postgresVersion}` : "";
const snapshot = postgresVersion >= 16 ? `-snapshot` : "";
run(`curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null`)
run(`echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg${snapshot} main${suffix}" | sudo tee /etc/apt/sources.list.d/pgdg.list`);
}
Expand Down

0 comments on commit 06188b5

Please sign in to comment.