Skip to content

Commit

Permalink
Patch via Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
postgres-dev committed Jul 25, 2023
1 parent 150aa68 commit 8c1ba1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
with:
path: ptrack

- name: Apply ptrack patch
run: |
echo var=${PG_BRANCH}
git apply --verbose --3way ../ptrack/patches/${PG_BRANCH}-ptrack-core.diff
- name: Apply ptrack patches
run: make patch
working-directory: postgres
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@ PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/ptrack
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
top_builddir ?= ../postgres
include $(POSTGRES_DIR)/src/Makefile.global
include $(POSTGRES_DIR)/contrib/contrib-global.mk
endif

ifndef PG_BRANCH
$(error PG_BRANCH is not defined. Set it to the desired PostgreSQL repository branch name (e.g. REL_15_STABLE).)
endif

patch:
@cd $(top_builddir) && \
echo Applying the ptrack patch... && \
git apply --verbose --3way $(CURDIR)/patches/${PG_BRANCH}-ptrack-core.diff
ifeq ($(MODE), paranoia)
@echo Applying turn-off-hint-bits.diff for the paranoia mode... && \
git apply --verbose --3way $(CURDIR)/patches/turn-off-hint-bits.diff
endif

0 comments on commit 8c1ba1a

Please sign in to comment.