diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4577459..0cfd094 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: dist-snapshot path: dist/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6d0909..dfcaa87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,14 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }} vscode-package: name: VSCode Extension runs-on: ubuntu-latest + needs: release + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -47,7 +51,33 @@ jobs: npm run compile npm run package - - uses: actions/upload-artifact@v4 + - name: Upload to release + run: gh release upload ${{ github.ref_name }} editors/vscode/*.vsix + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + datagrip-package: + name: DataGrip Plugin + runs-on: ubuntu-latest + needs: release + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 with: - name: pgtidy-vscode - path: editors/vscode/*.vsix + distribution: temurin + java-version: '21' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build plugin + working-directory: editors/datagrip + run: ./gradlew buildPlugin + + - name: Upload to release + run: gh release upload ${{ github.ref_name }} editors/datagrip/build/distributions/*.zip + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bba790f..9b72d6b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -34,6 +34,41 @@ archives: - LICENSE - README.md +nfpms: + - id: pgtidy + package_name: pgtidy + vendor: Warky Devs + homepage: https://git.warky.dev/wdevs/pgtidy + maintainer: Hein (Warky Devs) + description: PostgreSQL SQL formatter and linter + license: MIT + formats: + - deb + - rpm + - apk + bindir: /usr/bin + contents: + - src: LICENSE + dst: /usr/share/licenses/pgtidy/LICENSE + +aurs: + - name: pgtidy-bin + homepage: https://git.warky.dev/wdevs/pgtidy + description: PostgreSQL SQL formatter and linter + maintainers: + - Hein (Warky Devs) + license: MIT + private_key: "{{ .Env.AUR_SSH_KEY }}" + git_url: ssh://aur@aur.archlinux.org/pgtidy-bin.git + skip_upload: auto + provides: + - pgtidy + conflicts: + - pgtidy + package: |- + install -Dm755 "./pgtidy" "${pkgdir}/usr/bin/pgtidy" + install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/pgtidy/LICENSE" + checksum: name_template: "checksums.txt" diff --git a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.database-DB-243.21565.204.xml b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.database-DB-243.21565.204.xml index e7a3772..9f97ebe 100644 --- a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.database-DB-243.21565.204.xml +++ b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.database-DB-243.21565.204.xml @@ -4,13 +4,13 @@ - - + + + - - + diff --git a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.modules.json-DB-243.21565.204.xml b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.modules.json-DB-243.21565.204.xml index a43b757..9c26b7f 100644 --- a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.modules.json-DB-243.21565.204.xml +++ b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-com.intellij.modules.json-DB-243.21565.204.xml @@ -4,8 +4,8 @@ - + \ No newline at end of file diff --git a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-intellij.grid.core.impl-DB-243.21565.204.xml b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-intellij.grid.core.impl-DB-243.21565.204.xml index 7ffec8c..868a519 100644 --- a/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-intellij.grid.core.impl-DB-243.21565.204.xml +++ b/editors/datagrip/.intellijPlatform/localPlatformArtifacts/bundledPlugin-intellij.grid.core.impl-DB-243.21565.204.xml @@ -4,8 +4,8 @@ - + \ No newline at end of file diff --git a/editors/datagrip/.intellijPlatform/self-update.lock b/editors/datagrip/.intellijPlatform/self-update.lock index 042fa8e..135b728 100644 --- a/editors/datagrip/.intellijPlatform/self-update.lock +++ b/editors/datagrip/.intellijPlatform/self-update.lock @@ -1 +1 @@ -2026-06-28 \ No newline at end of file +2026-06-29 \ No newline at end of file diff --git a/editors/datagrip/build.gradle.kts b/editors/datagrip/build.gradle.kts index 08e6440..ed03e6e 100644 --- a/editors/datagrip/build.gradle.kts +++ b/editors/datagrip/build.gradle.kts @@ -1,13 +1,13 @@ plugins { id("org.jetbrains.intellij.platform") version "2.3.0" - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "2.1.21" } group = providers.gradleProperty("pluginGroup").get() version = providers.gradleProperty("pluginVersion").get() kotlin { - jvmToolchain(17) + jvmToolchain(21) } repositories { diff --git a/editors/vscode/.gitignore b/editors/vscode/.gitignore index 81b9b88..c92a7d3 100644 --- a/editors/vscode/.gitignore +++ b/editors/vscode/.gitignore @@ -1,4 +1,3 @@ out/ node_modules/ *.vsix -assets/ diff --git a/editors/vscode/assets/logo_256.png b/editors/vscode/assets/logo_256.png new file mode 100644 index 0000000..031c505 Binary files /dev/null and b/editors/vscode/assets/logo_256.png differ diff --git a/linux/arch/PKGBUILD b/linux/arch/PKGBUILD new file mode 100644 index 0000000..aa36be3 --- /dev/null +++ b/linux/arch/PKGBUILD @@ -0,0 +1,19 @@ +# Maintainer: Hein (Warky Devs) +pkgname=pgtidy-bin +pkgver=0.1.0 +pkgrel=1 +pkgdesc="PostgreSQL SQL formatter and linter" +arch=('x86_64' 'aarch64') +url="https://git.warky.dev/wdevs/pgtidy" +license=('MIT') +provides=('pgtidy') +conflicts=('pgtidy') +source_x86_64=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/pgtidy_${pkgver}_linux_amd64.tar.gz") +source_aarch64=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/pgtidy_${pkgver}_linux_arm64.tar.gz") +sha256sums_x86_64=('SKIP') +sha256sums_aarch64=('SKIP') + +package() { + install -Dm755 "pgtidy" "$pkgdir/usr/bin/pgtidy" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/linux/centos/pgtidy.spec b/linux/centos/pgtidy.spec new file mode 100644 index 0000000..704fb9a --- /dev/null +++ b/linux/centos/pgtidy.spec @@ -0,0 +1,40 @@ +Name: pgtidy +Version: 0.1.0 +Release: 1%{?dist} +Summary: PostgreSQL SQL formatter and linter + +License: MIT +URL: https://git.warky.dev/wdevs/pgtidy +Source0: %{name}-%{version}.tar.gz + +BuildRequires: golang >= 1.26 + +%global debug_package %{nil} +%define _debugsource_packages 0 +%define _debuginfo_subpackages 0 + +%description +PgTidy formats and lints PostgreSQL SQL, enforcing a consistent style +for migrations, schemas, functions, procedures, and triggers. + +%prep +%autosetup + +%build +export CGO_ENABLED=0 +go build \ + -trimpath \ + -ldflags "-X main.version=%{version}" \ + -o %{name} ./cmd/pgtidy + +%install +install -Dm755 %{name} %{buildroot}%{_bindir}/%{name} +install -Dm644 LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE + +%files +%license LICENSE +%{_bindir}/%{name} + +%changelog +* Sun Jun 29 2026 Hein (Warky Devs) - 0.1.0-1 +- Initial package diff --git a/linux/debian/control b/linux/debian/control new file mode 100644 index 0000000..5531281 --- /dev/null +++ b/linux/debian/control @@ -0,0 +1,10 @@ +Package: pgtidy +Version: VERSION +Architecture: ARCH +Maintainer: Hein (Warky Devs) +Section: database +Priority: optional +Homepage: https://git.warky.dev/wdevs/pgtidy +Description: PostgreSQL SQL formatter and linter + PgTidy formats and lints PostgreSQL SQL, enforcing a consistent style + for migrations, schemas, functions, procedures, and triggers.