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:
Austin Bonander
2021-12-29 17:25:49 -08:00
committed by GitHub
parent aa40f5fe5d
commit fdbfc5dfc3
11 changed files with 522 additions and 529 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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.