4 Commits
Author SHA1 Message Date
warkanum cba0975a90 ci(release): set umask and pipefail for .deb package build
CI / Test (push) Successful in 27s
CI / Build (push) Successful in 54s
2026-10-12 22:08:05 +02:00
warkanum 9809003dca chore(release): update release process and version handling
CI / Test (push) Successful in 18s
CI / Build (push) Successful in 36s
2026-10-12 21:29:32 +02:00
warkanum a224961596 chore(release): bump version to 1.0.0
CI / Test (push) Successful in 23s
CI / Build (push) Canceled after 33s
Release / Test (push) Successful in 23s
Release / Release (push) Successful in 1m24s
Release / RPM package (push) Successful in 1m8s
Release / Windows installer (push) Successful in 1m16s
Release / AUR package (pgtidy-bin) (push) Successful in 58s
Release / AUR package (pgtidy-src) (push) Successful in 1m8s
Release / VSCode Extension (push) Successful in 39s
Release / DataGrip Plugin (push) Successful in 2m55s
Release / Debian packages (push) Failing after 43s
2026-10-12 21:29:25 +02:00
warkanum f0b0477931 ci(release): rename source AUR package to pgtidy-src
Rename the source-built AUR package from pgtidy to pgtidy-src. It
provides and conflicts with pgtidy, matching pgtidy-bin.
2026-10-12 21:27:29 +02:00
7 changed files with 45 additions and 19 deletions
+4 -1
View File
@@ -123,6 +123,9 @@ jobs:
- name: Build .deb packages
run: |
set -euo pipefail
# Runner umask can be 000; dpkg-deb rejects group/world-writable package dirs.
umask 022
VERSION="${{ github.event.inputs.tag || github.ref_name }}"
PKGVER="${VERSION#v}"
@@ -268,7 +271,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pkg: [pgtidy-bin, pgtidy]
pkg: [pgtidy-bin, pgtidy-src]
steps:
- uses: actions/checkout@v4
+28 -6
View File
@@ -2,6 +2,12 @@ APP := pgtidy
CMD := ./cmd/pgtidy
DIST := dist
ARCH_PKGBUILDS := linux/arch/pgtidy-bin/PKGBUILD linux/arch/pgtidy-src/PKGBUILD
RPM_SPEC := linux/centos/pgtidy.spec
VSCODE_PKG := editors/vscode/package.json
DATAGRIP_PROPS := editors/datagrip/gradle.properties
PKG_FILES := $(ARCH_PKGBUILDS) $(RPM_SPEC) $(VSCODE_PKG) $(DATAGRIP_PROPS)
.PHONY: installer-windows build test lint vet fmt clean release release-version snapshot vscode-compile vscode-package
## build: compile binary for the current platform
@@ -44,12 +50,28 @@ release:
MAJOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'); \
MINOR=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'); \
PATCH=$$(echo $$CURRENT | sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'); \
NEXT="v$$MAJOR.$$MINOR.$$((PATCH + 1))"; \
PKGVER="$$MAJOR.$$MINOR.$$((PATCH + 1))"; \
echo "Current: $$CURRENT → Next: $$NEXT"; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" linux/arch/pgtidy-bin/PKGBUILD linux/arch/pgtidy/PKGBUILD; \
sed -i "s/^Version:.*/Version: $$PKGVER/" linux/centos/pgtidy.spec; \
git add linux/arch/pgtidy-bin/PKGBUILD linux/arch/pgtidy/PKGBUILD linux/centos/pgtidy.spec; \
echo "Current: $$CURRENT"; \
$(MAKE) --no-print-directory release-version VERSION="$$MAJOR.$$MINOR.$$((PATCH + 1))"
## release-version: release VERSION=X.Y.Z — set and verify version in all package files, commit, tag, push
release-version:
@set -e; PKGVER="$(VERSION)"; PKGVER="$${PKGVER#v}"; NEXT="v$$PKGVER"; \
if ! echo "$$PKGVER" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$$'; then \
echo "VERSION must be X.Y.Z (got '$(VERSION)')"; exit 1; fi; \
if git rev-parse -q --verify "refs/tags/$$NEXT" >/dev/null; then \
echo "Tag $$NEXT already exists"; exit 1; fi; \
echo "Releasing $$NEXT"; \
sed -i "s/^pkgver=.*/pkgver=$$PKGVER/" $(ARCH_PKGBUILDS); \
sed -i "s/^Version:.*/Version: $$PKGVER/" $(RPM_SPEC); \
sed -i "s/^ \"version\": \".*\",$$/ \"version\": \"$$PKGVER\",/" $(VSCODE_PKG); \
sed -i "s/^pluginVersion=.*/pluginVersion=$$PKGVER/" $(DATAGRIP_PROPS); \
fail=0; \
for f in $(ARCH_PKGBUILDS); do grep -qx "pkgver=$$PKGVER" $$f || { echo "pkgver not set in $$f"; fail=1; }; done; \
grep -qx "Version: $$PKGVER" $(RPM_SPEC) || { echo "Version not set in $(RPM_SPEC)"; fail=1; }; \
grep -qx " \"version\": \"$$PKGVER\"," $(VSCODE_PKG) || { echo "version not set in $(VSCODE_PKG)"; fail=1; }; \
grep -qx "pluginVersion=$$PKGVER" $(DATAGRIP_PROPS) || { echo "pluginVersion not set in $(DATAGRIP_PROPS)"; fail=1; }; \
if [ $$fail -ne 0 ]; then git checkout -- $(PKG_FILES); echo "Aborted — package files restored"; exit 1; fi; \
git add $(PKG_FILES); \
git commit -m "chore(release): bump version to $$PKGVER"; \
git tag -a "$$NEXT" -m "Release $$NEXT"; \
git push origin HEAD "$$NEXT"; \
+1 -1
View File
@@ -1,6 +1,6 @@
pluginGroup=com.pgtidy
pluginName=PgTidy
pluginVersion=0.1.0
pluginVersion=1.0.0
pluginSinceBuild=243
# DataGrip 2024.3
platformVersion=2024.3
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "pgtidy",
"displayName": "PgTidy",
"description": "PostgreSQL formatter and linter powered by pgtidy",
"version": "0.1.0",
"version": "1.0.0",
"publisher": "warky-devs",
"author": {
"name": "Hein Puth",
+1 -1
View File
@@ -1,6 +1,6 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=pgtidy-bin
pkgver=0.0.10
pkgver=1.0.0
pkgrel=1
pkgdesc="PostgreSQL SQL formatter and linter"
arch=('x86_64' 'aarch64')
@@ -1,32 +1,33 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=pgtidy
pkgver=0.0.10
pkgname=pgtidy-src
pkgver=1.0.0
pkgrel=1
pkgdesc="PostgreSQL SQL formatter and linter"
arch=('x86_64' 'aarch64')
url="https://git.warky.dev/wdevs/pgtidy"
license=('MIT')
makedepends=('go')
conflicts=('pgtidy-bin')
provides=('pgtidy')
conflicts=('pgtidy')
source=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/pgtidy-v$pkgver-source.tar.gz")
sha256sums=('SKIP')
build() {
cd "$pkgname-$pkgver"
cd "pgtidy-$pkgver"
export CGO_ENABLED=0
go build \
-trimpath \
-ldflags "-X main.version=v$pkgver" \
-o "$pkgname" ./cmd/pgtidy
-o pgtidy ./cmd/pgtidy
}
check() {
cd "$pkgname-$pkgver"
cd "pgtidy-$pkgver"
go test ./...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
cd "pgtidy-$pkgver"
install -Dm755 "pgtidy" "$pkgdir/usr/bin/pgtidy"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
+1 -1
View File
@@ -1,5 +1,5 @@
Name: pgtidy
Version: 0.0.10
Version: 1.0.0
Release: 1%{?dist}
Summary: PostgreSQL SQL formatter and linter