|
1 | 1 | dist:jammy
|
2 | 2 | language:c
|
3 | 3 | env:
|
4 |
| --PG_MAJOR=17 BETA=1 |
| 4 | +-PG_MAJOR=18 SNAPSHOT=1 |
| 5 | +-PG_MAJOR=17 |
5 | 6 | -PG_MAJOR=16
|
6 | 7 | -PG_MAJOR=15
|
7 | 8 | -PG_MAJOR=14
|
8 | 9 | -PG_MAJOR=13
|
9 |
| --PG_MAJOR=12 |
10 | 10 | before_script:
|
11 | 11 | -curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
12 |
| --echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee -a /etc/apt/sources.list |
13 |
| --if [ -n "${BETA}" ]; then echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main ${PG_MAJOR}" | sudo tee -a /etc/apt/sources.list; fi |
| 12 | +-| |
| 13 | + if [ -n "${SNAPSHOT}" ]; then |
| 14 | + echo "deb https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg-snapshot main ${PG_MAJOR}" |
| 15 | + elif [ -n "${BETA}" ]; then |
| 16 | + echo "deb https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main ${PG_MAJOR}" |
| 17 | + else |
| 18 | + echo "deb https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" |
| 19 | + fi | sudo tee /etc/apt/sources.list.d/postgresql.list |
| 20 | +-| |
| 21 | + if [ -n "${SNAPSHOT}" ]; then |
| 22 | + { |
| 23 | + echo "Package: *" |
| 24 | + echo "Pin: origin apt.postgresql.org" |
| 25 | + echo "Pin-Priority: 600" |
| 26 | + } | sudo tee /etc/apt/preferences.d/pgdg.pref |
| 27 | + fi |
14 | 28 | -sudo apt-get update
|
15 | 29 | -sudo systemctl stop postgresql
|
16 | 30 | -sudo apt-get install -y --no-install-recommends postgresql-client-${PG_MAJOR} postgresql-${PG_MAJOR} postgresql-server-dev-${PG_MAJOR}
|
|