Skip to content
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
16 changes: 8 additions & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
maturin-version: v1.7.1
working-directory: cli
working-directory: crates/cli
args: --release --out dist ${{ matrix.platform.maturin-options }}
manylinux: ${{ matrix.platform.manylinux }}
sccache: "true"
Expand All @@ -59,7 +59,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: cli/dist
path: crates/cli/dist
if-no-files-found: error

windows:
Expand All @@ -79,14 +79,14 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
working-directory: cli
working-directory: crates/cli
args: --release --out dist
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: cli/dist
path: crates/cli/dist
if-no-files-found: error

macos:
Expand All @@ -106,14 +106,14 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
working-directory: cli
working-directory: crates/cli
args: --release --out dist
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: cli/dist
path: crates/cli/dist
if-no-files-found: error

sdist:
Expand All @@ -126,13 +126,13 @@ jobs:
uses: PyO3/maturin-action@v1
with:
command: sdist
working-directory: cli
working-directory: crates/cli
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: cli/dist
path: crates/cli/dist
if-no-files-found: error

release:
Expand Down
34 changes: 28 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
[workspace]
members = [
"cli",
"parser",
"linter",
"github"
]
members = ["crates/*"]

[workspace.dependencies]
# third party
serde_json = "1.0"
tempfile = "3.2.0"
serde = { version = "1.0", features = ["derive"] }
structopt = "0.3"
console = "0.11.3"
atty = "0.2"
base64 = "0.12.2"
simplelog = "0.12.0"
log = "0.4.8"
toml = "0.5.9"
glob = "0.3.1"
insta = "0.16.0"
jsonwebtoken = "8.1.1"
reqwest = { version = "0.9.18", features = ["default-tls-vendored"]}
serde_plain = "1.0"
lazy_static = "1.4.0"
serde_repr = "0.1"
libpg_query-sys = { git = "https://github.com/chdsbd/libpg_query-sys.git", rev = "ac223c7b197459d657d166449ccf99883f23bbcb" }

# local
squawk-parser = { version = "0.0.0", path = "./crates/parser" }
squawk-linter = { version = "0.0.0", path = "./crates/linter" }
squawk-github = { version = "0.0.0", path = "./crates/github" }

[profile.dev.package]
insta.opt-level = 3
32 changes: 16 additions & 16 deletions cli/Cargo.toml → crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ license = "GPL-3.0"
description = "Linter for Postgresql focused on database migrations."
repository = "https://github.com/sbdchd/squawk"
documentation = "https://github.com/sbdchd/squawk/blob/master/README.md"
readme = "../README.md"
readme = "../../README.md"
keywords = ["postgres", "postgresql", "linter"]
categories = ["command-line-utilities", "development-tools"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde_json = "1.0"
tempfile = "3.2.0"
serde = { version = "1.0", features = ["derive"] }
structopt = "0.3"
console = "0.11.3"
atty = "0.2"
base64 = "0.12.2"
simplelog = "0.12.0"
log = "0.4.8"
squawk-parser = { version = "0.0.0", path = "../parser" }
squawk-linter = { version = "0.0.0", path = "../linter" }
squawk-github = { version = "0.0.0", path = "../github" }
toml = "0.5.9"
glob = "0.3.1"
serde_json.workspace = true
tempfile.workspace = true
serde.workspace = true
structopt.workspace = true
console.workspace = true
atty.workspace = true
base64.workspace = true
simplelog.workspace = true
log.workspace = true
squawk-parser.workspace = true
squawk-linter.workspace = true
squawk-github.workspace = true
toml.workspace = true
glob.workspace = true

[dev-dependencies]
insta = "0.16.0"
insta.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions github/Cargo.toml → crates/github/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ keywords = ["bot", "github", "linter"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
jsonwebtoken = "*"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
reqwest = { version = "0.9.18", features = ["default-tls-vendored"]}
log = "0.4.8"
jsonwebtoken.workspace = true
serde_json.workspace = true
serde.workspace = true
reqwest.workspace = true
log.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions linter/Cargo.toml → crates/linter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ keywords = ["postgres", "sql", "linter"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = { version = "1.0", features = ["derive"] }
squawk-parser = { version = "0.0.0", path = "../parser" }
serde_plain = "1.0"
lazy_static = "1.4.0"
serde_json = "1.0"
serde.workspace = true
squawk-parser.workspace = true
serde_plain.workspace = true
lazy_static.workspace = true
serde_json.workspace = true

[dev-dependencies]
insta = "0.16.0"
insta.workspace = true
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.
10 changes: 5 additions & 5 deletions parser/Cargo.toml → crates/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ keywords = ["postgres", "sql", "parser"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_repr = "0.1"
libpg_query-sys = { git = "https://github.com/chdsbd/libpg_query-sys.git", rev = "ac223c7b197459d657d166449ccf99883f23bbcb" }
serde_json.workspace = true
serde.workspace = true
serde_repr.workspace = true
libpg_query-sys.workspace = true

[dev-dependencies]
insta = "0.16.0"
insta.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion s/check-version
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Errors if latest version in changelog does not match package.json and cli/Cargo.

This script helps prevent releasing Squawk without updating the version using s/update-version.
"""

from __future__ import annotations
from pathlib import Path
import re
Expand Down Expand Up @@ -37,7 +38,7 @@ CLI_VERSION_PATTERN = r"version = \"(?P<version>\d+\.\d+\.\d+)\""


def find_cli_version() -> str:
cargo_toml = squawk_root() / "cli" / "Cargo.toml"
cargo_toml = squawk_root() / "crates" / "cli" / "Cargo.toml"
for line in cargo_toml.read_text().split("\n"):
match = re.match(CLI_VERSION_PATTERN, line)
if match is not None:
Expand Down
Loading