Switch to Cargo workspace setup.

This commit is contained in:
Bauke 2022-10-28 15:44:43 +02:00
parent 09921bd6cb
commit d958780c25
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
16 changed files with 32 additions and 26 deletions

View File

@ -1,24 +1,4 @@
[package] [workspace]
name = "hooked" members = [
description = "Git hooks manager." "hooked-library"
repository = "https://git.bauke.xyz/Holllo/hooked" ]
license = "AGPL-3.0-or-later"
version = "0.1.0"
authors = ["Holllo <helllo@holllo.org>"]
edition = "2021"
[lib]
name = "hooked"
path = "source/lib.rs"
[dependencies]
color-eyre = "0.6.2"
toml = "0.5.9"
[dependencies.serde]
features = ["derive"]
version = "1.0.147"
[dev-dependencies]
insta = "1.21.0"
test-case = "2.2.2"

View File

@ -1,3 +1,6 @@
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
[tasks.fmt] [tasks.fmt]
command = "cargo" command = "cargo"
args = ["fmt", "${@}"] args = ["fmt", "${@}"]

23
hooked-library/Cargo.toml Normal file
View File

@ -0,0 +1,23 @@
[package]
name = "hooked-library"
description = "Git hooks manager."
repository = "https://git.bauke.xyz/Holllo/hooked"
license = "AGPL-3.0-or-later"
version = "0.1.0"
authors = ["Holllo <helllo@holllo.org>"]
edition = "2021"
[lib]
path = "source/lib.rs"
[dependencies]
color-eyre = "0.6.2"
toml = "0.5.9"
[dependencies.serde]
features = ["derive"]
version = "1.0.147"
[dev-dependencies]
insta = "1.21.0"
test-case = "2.2.2"

View File

@ -1,6 +1,6 @@
use std::path::PathBuf; use std::path::PathBuf;
use {color_eyre::Result, hooked::Config}; use {color_eyre::Result, hooked_library::Config};
use {insta::assert_debug_snapshot, test_case::test_case}; use {insta::assert_debug_snapshot, test_case::test_case};

View File

@ -1,5 +1,5 @@
use { use {
hooked::{Config, ExitAction, PreCommit, Task}, hooked_library::{Config, ExitAction, PreCommit, Task},
toml::to_string_pretty, toml::to_string_pretty,
}; };