Skip to content
Open
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
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,30 @@
github-token: ${{ secrets.GITHUB_TOKEN }}
files: ./build-${{ matrix.pg-version }}/coverage.info

validate-sql-snapshot:
runs-on: macos-15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Nix
uses: cachix/install-nix-action@c134e4c9e34bac6cab09cf239815f9339aaaf84e # v31.5.1
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Use Cachix Cache
uses: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16
with:
name: nxpg
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Run snapshot
run: nix develop --command "./scripts/dump_extension.sh"

- name: Check for diffs in pg_net.sql snapshot
run: nix-shell --run "git diff --exit-code ./pg_net.sql"

style:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ nginx.pid
tags
net_worker.pid
pg_net--*.sql
!pg_net--0.1.sql
Comment thread
AndrewJackson2020 marked this conversation as resolved.
!pg_net--*--*.sql
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ else
endif

EXTENSION = pg_net
EXTVERSION = 0.20.4
EXTVERSION = 0.20.6

DATA = $(wildcard sql/*--*.sql)

EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
EXTRA_CLEAN = $(EXTENSION).control

TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
Expand All @@ -58,14 +58,14 @@ SHLIB_LINK = -lcurl
# Find <curl/curl.h> from system headers
PG_CPPFLAGS := $(CPPFLAGS) -DEXTVERSION=\"$(EXTVERSION)\"

all: sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
all: $(EXTENSION).control

build: $(BUILD_DIR)/$(EXTENSION).$(SHARED_EXT) sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
build: $(BUILD_DIR)/$(EXTENSION).$(SHARED_EXT) $(EXTENSION).control

$(BUILD_DIR)/.gitignore: sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
$(BUILD_DIR)/.gitignore: $(EXTENSION).control
mkdir -p $(BUILD_DIR)/extension
cp $(EXTENSION).control $(BUILD_DIR)/extension
cp sql/$(EXTENSION)--$(EXTVERSION).sql $(BUILD_DIR)/extension
cp sql/*.sql $(BUILD_DIR)/extension
echo "*" > $(BUILD_DIR)/.gitignore

$(BUILD_DIR)/%.o: src/%.c $(HEADERS) $(BUILD_DIR)/.gitignore
Expand All @@ -74,9 +74,6 @@ $(BUILD_DIR)/%.o: src/%.c $(HEADERS) $(BUILD_DIR)/.gitignore
$(BUILD_DIR)/$(EXTENSION).$(SHARED_EXT): $(EXTENSION).$(SHARED_EXT)
mv $? $@

sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@

$(EXTENSION).control: $(EXTENSION).control.in
sed "s/@EXTVERSION@/$(EXTVERSION)/g" $(EXTENSION).control.in > $@

Expand Down
Loading
Loading