feat: update environment configuration, enhance Dockerfiles, and refactor API handling
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn touch(file_name: &str) {
|
||||
if cfg!(target_os = "windows") {
|
||||
Command::new("cmd")
|
||||
.args(["/C", &format!("type nul >> {}", file_name)])
|
||||
.output()
|
||||
.expect("failed to execute touch");
|
||||
} else {
|
||||
Command::new("touch")
|
||||
.arg(file_name)
|
||||
.output()
|
||||
.expect("failed to execute touch");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_dev_db(db_url: &str) {
|
||||
let prefix = "sqlite://";
|
||||
if let Some(file_name) = db_url.strip_prefix(prefix) {
|
||||
touch(file_name);
|
||||
}
|
||||
}
|
@@ -1,6 +1,4 @@
|
||||
mod db;
|
||||
mod file;
|
||||
pub mod testing;
|
||||
|
||||
pub use db::migrate;
|
||||
pub use file::create_dev_db;
|
||||
|
Reference in New Issue
Block a user