Skip to content

Commit 30cb5bc

Browse files
authored
Merge pull request diesel-rs#1672 from nickbabcock/bundled
Enable sqlite/bundle for diesel cli redux
2 parents 294a9c9 + 2ff447e commit 30cb5bc

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ matrix:
5555
script:
5656
- cargo install rustfmt-nightly --vers 0.3.7 --force
5757
- cargo fmt --all -- --write-mode=diff
58+
- rust: stable
59+
env:
60+
- SQLITE_BUNDLED=YESPLEASE
61+
- SQLITE_DATABASE_URL=/tmp/test.db
62+
script:
63+
- (cd diesel_cli && travis-cargo test -- --no-default-features --features "sqlite-bundled")
64+
5865
env:
5966
matrix:
6067
- BACKEND=sqlite

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
2020
`NonAggregate` for your function. See [the documentation for
2121
`sql_function!`][sql-function-1-3-0] for more details.
2222

23+
* Added `sqlite-bundled` feature to `diesel_cli` to make installing on
24+
some platforms easier.
25+
2326
### Changed
2427

2528
* `sql_function!` has been redesigned. The syntax is now `sql_function!(fn

diesel_cli/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tempfile = "3.0.0"
2727
toml = "0.4.6"
2828
url = { version = "1.4.0", optional = true }
2929
barrel = { version = "<= 0.2.0", optional = true, features = ["diesel-filled"] }
30+
libsqlite3-sys = { version = ">=0.8.0, <0.10.0", optional = true, features = ["min_sqlite_version_3_7_16"] }
3031

3132
[dev-dependencies]
3233
difference = "1.0"
@@ -41,6 +42,7 @@ postgres = ["diesel/postgres", "infer_schema_internals/postgres", "url"]
4142
sqlite = ["diesel/sqlite", "infer_schema_internals/sqlite"]
4243
mysql = ["diesel/mysql", "infer_schema_internals/mysql", "url"]
4344
barrel-migrations = ["migrations_internals/barrel", "barrel"]
45+
sqlite-bundled = ["sqlite", "libsqlite3-sys/bundled"]
4446

4547
[[test]]
4648
name = "tests"

diesel_cli/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ cargo install diesel_cli --no-default-features --features "postgres sqlite mysql
2222
[sqlite]: http://www.sqlitetutorial.net/download-install-sqlite/
2323
[mysql]: https://dev.mysql.com/doc/refman/5.7/en/installing.html
2424

25+
If you are using a system without an easy way to install sqlite (for example Windows),
26+
you can use a bundled version instead:
27+
28+
```shell
29+
cargo install diesel_cli --no-default-features --features "sqlite-bundled"
30+
```
31+
2532
Getting Started
2633
---------------
2734

0 commit comments

Comments
 (0)