Skip to content

Commit b4f9789

Browse files
committed
Pull up PGVERSIONS and restore pg16 target
and use it to set PGVERSION to the lastest
1 parent 6c4f660 commit b4f9789

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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+
49
TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
510

611
VERSION_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
2429
DOCS_PORT = 8000
2530

26-
PGVERSION ?= 14
27-
2831
# We use pg not PG in uppercase in the var name to ease implicit rules matching
2932
BUILD_ARGS_pg11 = --build-arg PGVERSION=11 --build-arg CITUSTAG=v9.5.10
3033
BUILD_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-
273274
BUILD_TEST_TARGETS = $(patsubst %,build-test-pg%,$(PGVERSIONS))
274275

275276
.PHONY: $(BUILD_TEST_TARGETS)
@@ -305,8 +306,9 @@ $(BUILD_TARGETS): version
305306
.PHONY: build
306307
build: $(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

Comments
 (0)