Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganized repository structure #77

Merged
merged 5 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ WORKDIR /src/set_user
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install postgresql-server-dev-${DEVPKG} make gcc
RUN make USE_PGXS=1 install
RUN make install
2 changes: 1 addition & 1 deletion .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pgver: [9.4, 9.5, 9.6, 10, 11, 12, 13, 14, 15]
pgver: [12, 13, 14, 15]

steps:
- name: Checkout set_user repo
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ results

# Generated documentation
*.pdf

# Generated extension file
extension/set_user--*.sql
11 changes: 11 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
4.0.1

NEW FEATURES
============
- Reorganized repository structure to allow for easier management of extension files during build process.
- Added NO_PGXS build flag to allow building of extension without PGXS. Restores ability to build on Windows.
- No changes to extension code.

BUGFIXES
========
- None
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
MODULES = set_user

EXTENSION = set_user
DATA = set_user--3.0.sql set_user--2.0--3.0.sql set_user--1.6--2.0.sql set_user--1.5--1.6.sql set_user--1.4--1.5.sql set_user--1.1--1.4.sql set_user--1.0--1.1.sql set_user--4.0.0rc1--4.0.0.sql set_user--4.0.0.sql set_user--3.0--4.0.0.sql
EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
LDFLAGS_SL += $(filter -lm, $(LIBS))
MODULES = src/set_user
PG_CONFIG = pg_config
PGFILEDESC = "set_user - similar to SET ROLE but with added logging"

REGRESS = set_user

LDFLAGS_SL += $(filter -lm, $(LIBS))
all: extension/$(EXTENSION)--$(EXTVERSION).sql

extension/$(EXTENSION)--$(EXTVERSION).sql: extension/set_user.sql
cat $^ > $@

DATA = $(wildcard updates/*--*.sql) extension/$(EXTENSION)--$(EXTVERSION).sql
EXTRA_CLEAN = extension/$(EXTENSION)--$(EXTVERSION).sql

ifdef NO_PGXS
subdir = contrib/set_user
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
else
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
endif
Expand All @@ -25,7 +31,7 @@ install: install-headers

install-headers:
$(MKDIR_P) "$(DESTDIR)$(includedir)"
$(INSTALL_DATA) "set_user.h" "$(DESTDIR)$(includedir)"
$(INSTALL_DATA) "src/set_user.h" "$(DESTDIR)$(includedir)"

uninstall: uninstall-headers

Expand Down
File renamed without changes.
44 changes: 0 additions & 44 deletions set_user--1.6.sql

This file was deleted.

53 changes: 0 additions & 53 deletions set_user--3.0.sql

This file was deleted.

2 changes: 1 addition & 1 deletion set_user.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# set_user extension
comment = 'similar to SET ROLE but with added logging'
default_version = '4.0.0'
default_version = '4.0.1'
module_pathname = '$libdir/set_user'
relocatable = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions updates/set_user--4.0.0--4.0.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* set-user--4.0.0--4.0.1.sql */

-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION set_user UPDATE" to load this file. \quit

-- just bumping our version to 4.0.1. no new SQL features here, so nothing to do.
File renamed without changes.
File renamed without changes.