mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 10:38:57 +00:00
Prepare 0.5.10 release (#1603)
* fix(cli): change new `rustls` and `native-tls` features to use correct runtime feature
* chore: upgrade SQLx crates to 0.5.10, upgrade all dependencies to latest versions
chore(cli): upgraded `clap` to `3.0.0-rc.9`
* fix(tests/sqlite): ignore `issue_1467()` as spuriously failing
I'm well aware of the principle that a spuriously failing test is a failing test, but even though I have it outputting the seed used with a reproducible PRNG, I can't reproduce the failures locally, so 🤷.
* chore: add CHANGELOG entry for 0.5.10
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sqlx-cli"
|
||||
version = "0.5.9"
|
||||
version = "0.5.10"
|
||||
description = "Command-line utility for SQLx, the Rust SQL toolkit."
|
||||
edition = "2018"
|
||||
readme = "README.md"
|
||||
@@ -25,36 +25,32 @@ name = "cargo-sqlx"
|
||||
path = "src/bin/cargo-sqlx.rs"
|
||||
|
||||
[dependencies]
|
||||
dotenv = "0.15"
|
||||
tokio = { version = "1.0.1", features = ["macros", "rt", "rt-multi-thread"] }
|
||||
sqlx = { version = "0.5.9", path = "..", default-features = false, features = [
|
||||
dotenv = "0.15.0"
|
||||
tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] }
|
||||
sqlx = { version = "0.5.10", path = "..", default-features = false, features = [
|
||||
"migrate",
|
||||
"any",
|
||||
"offline",
|
||||
] }
|
||||
futures = "0.3"
|
||||
# FIXME: we need to fix both of these versions until Clap 3.0 proper is released, then we can drop `clap_derive`
|
||||
# https://github.com/launchbadge/sqlx/issues/1378
|
||||
# https://github.com/clap-rs/clap/issues/2705
|
||||
clap = "=3.0.0-beta.2"
|
||||
clap_derive = "=3.0.0-beta.2"
|
||||
chrono = "0.4"
|
||||
anyhow = "1.0"
|
||||
url = { version = "2.1.1", default-features = false }
|
||||
async-trait = "0.1.30"
|
||||
futures = "0.3.19"
|
||||
clap = { version = "3.0.0-rc.9", features = ["derive", "env", "cargo"] }
|
||||
chrono = "0.4.19"
|
||||
anyhow = "1.0.52"
|
||||
url = { version = "2.2.2", default-features = false }
|
||||
async-trait = "0.1.52"
|
||||
console = "0.14.1"
|
||||
promptly = "0.3.0"
|
||||
serde_json = "1.0.53"
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde_json = "1.0.73"
|
||||
serde = { version = "1.0.132", features = ["derive"] }
|
||||
glob = "0.3.0"
|
||||
openssl = { version = "0.10.30", optional = true }
|
||||
openssl = { version = "0.10.38", optional = true }
|
||||
# workaround for https://github.com/rust-lang/rust/issues/29497
|
||||
remove_dir_all = "0.7.0"
|
||||
|
||||
[features]
|
||||
default = ["postgres", "sqlite", "mysql", "native-tls"]
|
||||
rustls = ["sqlx/runtime-async-std-rustls"]
|
||||
native-tls = ["sqlx/runtime-async-std-native-tls"]
|
||||
rustls = ["sqlx/runtime-tokio-rustls"]
|
||||
native-tls = ["sqlx/runtime-tokio-native-tls"]
|
||||
|
||||
# databases
|
||||
mysql = ["sqlx/mysql"]
|
||||
|
||||
@@ -12,12 +12,13 @@ async fn main() {
|
||||
|
||||
dotenv().ok();
|
||||
let matches = Opt::into_app()
|
||||
.version(crate_version!())
|
||||
.bin_name("cargo sqlx")
|
||||
.setting(AppSettings::NoBinaryName)
|
||||
.get_matches_from(args);
|
||||
|
||||
if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await {
|
||||
let opt = Opt::from_arg_matches(&matches).unwrap_or_else(|e| e.exit());
|
||||
|
||||
if let Err(error) = sqlx_cli::run(opt).await {
|
||||
println!("{} {}", style("error:").bold().red(), error);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use clap::{crate_version, FromArgMatches, IntoApp};
|
||||
use clap::Parser;
|
||||
use console::style;
|
||||
use dotenv::dotenv;
|
||||
use sqlx_cli::Opt;
|
||||
@@ -6,10 +6,8 @@ use sqlx_cli::Opt;
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv().ok();
|
||||
let matches = Opt::into_app().version(crate_version!()).get_matches();
|
||||
|
||||
// no special handling here
|
||||
if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await {
|
||||
if let Err(error) = sqlx_cli::run(Opt::parse()).await {
|
||||
println!("{} {}", style("error:").bold().red(), error);
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
use clap::Clap;
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(version, about, author)]
|
||||
pub struct Opt {
|
||||
#[clap(subcommand)]
|
||||
pub command: Command,
|
||||
}
|
||||
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub enum Command {
|
||||
#[clap(alias = "db")]
|
||||
Database(DatabaseOpt),
|
||||
@@ -44,13 +45,13 @@ pub enum Command {
|
||||
}
|
||||
|
||||
/// Group of commands for creating and dropping your database.
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct DatabaseOpt {
|
||||
#[clap(subcommand)]
|
||||
pub command: DatabaseCommand,
|
||||
}
|
||||
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub enum DatabaseCommand {
|
||||
/// Creates the database specified in your DATABASE_URL.
|
||||
Create {
|
||||
@@ -100,7 +101,7 @@ pub enum DatabaseCommand {
|
||||
}
|
||||
|
||||
/// Group of commands for creating and running migrations.
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct MigrateOpt {
|
||||
/// Path to folder containing migrations.
|
||||
#[clap(long, default_value = "migrations")]
|
||||
@@ -110,7 +111,7 @@ pub struct MigrateOpt {
|
||||
pub command: MigrateCommand,
|
||||
}
|
||||
|
||||
#[derive(Clap, Debug)]
|
||||
#[derive(Parser, Debug)]
|
||||
pub enum MigrateCommand {
|
||||
/// Create a new migration with the given description,
|
||||
/// and the current time as the version.
|
||||
|
||||
Reference in New Issue
Block a user