Skip to content

Commit 3d16bf2

Browse files
committed
faet: move into workspace
1 parent 6fc8449 commit 3d16bf2

File tree

27 files changed

+68
-62
lines changed

27 files changed

+68
-62
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ jobs:
1515

1616
- name: Verify tag matches Cargo.toml version
1717
run: |
18-
CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
18+
CARGO_VERSION=$(grep '^version' crates/sqlx_gen/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
1919
TAG_VERSION=${GITHUB_REF#refs/tags/}
2020
if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
2121
echo "Tag $TAG_VERSION does not match Cargo.toml version $CARGO_VERSION"
2222
exit 1
2323
fi
2424
25-
- name: Publish
26-
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
25+
- name: Publish sqlx-gen-macros
26+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --package sqlx-gen-macros
27+
28+
- name: Wait for crates.io index update
29+
run: sleep 30
30+
31+
- name: Publish sqlx-gen
32+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --package sqlx-gen

Cargo.toml

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,3 @@
11
[workspace]
2-
members = [".", "sqlx_gen_macros"]
3-
4-
[package]
5-
name = "sqlx-gen"
6-
version = "0.4.0"
7-
edition = "2021"
8-
description = "Generate Rust structs from database schema introspection"
9-
license = "MIT"
10-
repository = "https://github.com/LeadcodeDev/sqlx-gen"
11-
readme = "README.md"
12-
keywords = ["sqlx", "codegen", "postgres", "mysql", "sqlite"]
13-
categories = ["database", "development-tools"]
14-
15-
[[bin]]
16-
name = "sqlx-gen"
17-
required-features = ["cli"]
18-
19-
[features]
20-
default = ["cli"]
21-
cli = [
22-
"dep:sqlx",
23-
"dep:tokio",
24-
"dep:clap",
25-
"dep:heck",
26-
"dep:thiserror",
27-
"dep:quote",
28-
"dep:proc-macro2",
29-
"dep:syn",
30-
"dep:prettyplease",
31-
"dep:log",
32-
"dep:env_logger",
33-
]
34-
35-
[dependencies]
36-
sqlx-gen-macros = { path = "sqlx_gen_macros", version = "0.4.0" }
37-
sqlx = { version = "0.8", features = [
38-
"runtime-tokio",
39-
"tls-rustls-ring",
40-
"postgres",
41-
"mysql",
42-
"sqlite",
43-
"chrono",
44-
"uuid",
45-
"json",
46-
], optional = true }
47-
tokio = { version = "1", features = ["full"], optional = true }
48-
clap = { version = "4", features = ["derive", "env"], optional = true }
49-
heck = { version = "0.5", optional = true }
50-
thiserror = { version = "2", optional = true }
51-
quote = { version = "1", optional = true }
52-
proc-macro2 = { version = "1", optional = true }
53-
syn = { version = "2", optional = true }
54-
prettyplease = { version = "0.2", optional = true }
55-
log = { version = "0.4", optional = true }
56-
env_logger = { version = "0.11", optional = true }
57-
58-
[dev-dependencies]
59-
pretty_assertions = "1"
60-
tempfile = "3"
2+
members = ["crates/sqlx_gen", "crates/sqlx_gen_macros"]
3+
resolver = "2"

crates/sqlx_gen/Cargo.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[package]
2+
name = "sqlx-gen"
3+
version = "0.4.0"
4+
edition = "2021"
5+
description = "Generate Rust structs from database schema introspection"
6+
license = "MIT"
7+
repository = "https://github.com/LeadcodeDev/sqlx-gen"
8+
readme = "../../README.md"
9+
keywords = ["sqlx", "codegen", "postgres", "mysql", "sqlite"]
10+
categories = ["database", "development-tools"]
11+
12+
[[bin]]
13+
name = "sqlx-gen"
14+
required-features = ["cli"]
15+
16+
[features]
17+
default = ["cli"]
18+
cli = [
19+
"dep:sqlx",
20+
"dep:tokio",
21+
"dep:clap",
22+
"dep:heck",
23+
"dep:thiserror",
24+
"dep:quote",
25+
"dep:proc-macro2",
26+
"dep:syn",
27+
"dep:prettyplease",
28+
"dep:log",
29+
"dep:env_logger",
30+
]
31+
32+
[dependencies]
33+
sqlx-gen-macros = { path = "../sqlx_gen_macros", version = "0.4.0" }
34+
sqlx = { version = "0.8", features = [
35+
"runtime-tokio",
36+
"tls-rustls-ring",
37+
"postgres",
38+
"mysql",
39+
"sqlite",
40+
"chrono",
41+
"uuid",
42+
"json",
43+
], optional = true }
44+
tokio = { version = "1", features = ["full"], optional = true }
45+
clap = { version = "4", features = ["derive", "env"], optional = true }
46+
heck = { version = "0.5", optional = true }
47+
thiserror = { version = "2", optional = true }
48+
quote = { version = "1", optional = true }
49+
proc-macro2 = { version = "1", optional = true }
50+
syn = { version = "2", optional = true }
51+
prettyplease = { version = "0.2", optional = true }
52+
log = { version = "0.4", optional = true }
53+
env_logger = { version = "0.11", optional = true }
54+
55+
[dev-dependencies]
56+
pretty_assertions = "1"
57+
tempfile = "3"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)