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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/publish.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Generate Packages
id: generate-packages
run: node packages/@postgrestools/postgrestools/scripts/generate-packages.mjs
run: node packages/@pgls/cli/scripts/generate-packages.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.release-tag }}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Publish npm packages as nightly
if: inputs.is-prerelease == 'true'
run: |
for package in packages/@postgrestools/*; do
for package in packages/@pgls/*; do
npm publish "$package" --tag nightly --access public --provenance
done
env:
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Publish npm packages as latest
if: inputs.is-prerelease != 'true'
run: |
for package in packages/@postgrestools/*; do
for package in packages/@pgls/*; do
version="${{ inputs.release-tag }}"
npm_package_name=$(jq -r ".name" "$package/package.json")

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,19 @@ jobs:
with:
cache-base: main
- name: Build main binary
run: cargo build -p pgt_cli --release
run: cargo build -p pgls_cli --release
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install JS dependencies
run: bun install
- name: Build backend-jsonrpc
working-directory: packages/@postgrestools/backend-jsonrpc
working-directory: packages/@pgls/backend-jsonrpc
run: bun run build
- name: Run backend-jsonrpc test
working-directory: packages/@postgrestools/backend-jsonrpc
working-directory: packages/@pgls/backend-jsonrpc
run: bun run test
- name: Run cli test
working-directory: packages/@postgrestools/postgrestools
working-directory: packages/@pgls/cli
run: bun run test

codegen:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,33 @@ jobs:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres

- name: 🛠️ Run Build
run: cargo build -p pgt_cli --release --target ${{ matrix.config.target }}
run: cargo build -p pgls_cli --release --target ${{ matrix.config.target }}
env:
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
# Inline the version in the CLI binary
PGT_VERSION: ${{ needs.extract_version.outputs.version }}
PGLS_VERSION: ${{ needs.extract_version.outputs.version }}

# windows is a special snowflake too, it saves binaries as .exe
- name: 👦 Name the Binary
if: matrix.config.os == 'windows-2022'
run: |
mkdir dist
cp target/${{ matrix.config.target }}/release/postgrestools.exe ./dist/postgrestools_${{ matrix.config.target }}
cp target/${{ matrix.config.target }}/release/pgls.exe ./dist/pgls_${{ matrix.config.target }}
- name: 👦 Name the Binary
if: matrix.config.os != 'windows-2022'
run: |
mkdir dist
cp target/${{ matrix.config.target }}/release/postgrestools ./dist/postgrestools_${{ matrix.config.target }}
cp target/${{ matrix.config.target }}/release/pgls ./dist/pgls_${{ matrix.config.target }}

# It is not possible to return the artifacts from the matrix jobs individually: Matrix outputs overwrite each other.
# A common workaround is to upload and download the resulting artifacts.
- name: 👆 Upload Artifacts
id: upload-artifacts
uses: actions/upload-artifact@v4
with:
name: postgrestools_${{ matrix.config.target }}
path: ./dist/postgrestools_*
name: pgls_${{ matrix.config.target }}
path: ./dist/pgls_*
# The default compression level is 6; this took the binary down from 350 to 330MB.
# It is recommended to use a lower level for binaries, since the compressed result is not much smaller,
# and the higher levels of compression take much longer.
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
id: download
with:
merge-multiple: true
pattern: postgrestools_*
pattern: pgls_*

- name: 📂 Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -159,7 +159,7 @@ jobs:
body: ${{ steps.create_changelog.outputs.content }}
tag_name: ${{ steps.create_changelog.outputs.version }}
files: |
postgrestools_*
pgls_*
docs/schema.json
fail_on_unmatched_files: true
draft: true
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "crates/pgt_query/vendor/libpg_query"]
path = crates/pgt_query/vendor/libpg_query
[submodule "crates/pgls_query/vendor/libpg_query"]
path = crates/pgls_query/vendor/libpg_query
url = https://github.com/pganalyze/libpg_query.git
branch = 17-latest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ just new-crate <name>
```

### CLI Usage
The main CLI binary is `postgrestools`:
The main CLI binary is `pgls`:
```bash
cargo run -p pgt_cli -- check file.sql
# or after building:
./target/release/postgrestools check file.sql
./target/release/pgls check file.sql
```

## Architecture
Expand Down
Loading
Loading