11# Copyright (c) Microsoft Corporation. All rights reserved.
22# Licensed under the PostgreSQL License.
33
4+ # Supported PostgreSQL versions:
5+ PGVERSIONS = 11 12 13 14 15 16
6+ # Default version:
7+ PGVERSION ?= $(lastword $(PGVERSIONS ) )
8+
49TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) )
510
611VERSION_FILE = src/bin/pg_autoctl/git-version.h
@@ -23,8 +28,6 @@ DOCKER_RUN_OPTS = --privileged --rm
2328# make serve-docs uses this port on localhost to expose the web server
2429DOCS_PORT = 8000
2530
26- PGVERSION ?= 14
27-
2831# We use pg not PG in uppercase in the var name to ease implicit rules matching
2932BUILD_ARGS_pg11 = --build-arg PGVERSION=11 --build-arg CITUSTAG=v9.5.10
3033BUILD_ARGS_pg12 = --build-arg PGVERSION=12 --build-arg CITUSTAG=v10.2.9
@@ -268,8 +271,6 @@ build-image:
268271# Citus 9.0 seems to be the most recent version of Citus with Postgres 10
269272# support, but fails to compile nowadays...
270273
271- PGVERSIONS = 11 12 13 14 15
272-
273274BUILD_TEST_TARGETS = $(patsubst % ,build-test-pg% ,$(PGVERSIONS ) )
274275
275276.PHONY : $(BUILD_TEST_TARGETS )
@@ -305,8 +306,9 @@ $(BUILD_TARGETS): version
305306.PHONY : build
306307build : $(BUILD_TARGETS ) ;
307308
308- build-check :
309- for v in 11 12 13 14 15 16; do \
309+ .PHONY : build-check
310+ build-check : $(BUILD_TEST_TARGETS )
311+ for v in $( PGVERSIONS) ; do \
310312 docker run --rm -t pg_auto_failover_test:pg$$ v pg_autoctl version --json | jq " .pg_version" | xargs echo $$ v: ; \
311313 done
312314
0 commit comments