Skip to content

Commit d0e05fd

Browse files
Change tabs to spaces
1 parent ca6bcb7 commit d0e05fd

File tree

12 files changed

+817
-817
lines changed

12 files changed

+817
-817
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ categories = ["command-line-utilities"]
1010
readme = "README.md"
1111
license = "MPL-2.0"
1212
keywords = [
13-
"minecraft",
14-
"mod-manager",
15-
"modrinth",
16-
"curseforge",
17-
"github"
13+
"minecraft",
14+
"mod-manager",
15+
"modrinth",
16+
"curseforge",
17+
"github"
1818
]
1919

2020
[features]

justfile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,56 @@ set windows-powershell := true
33

44
# Build for macOS Intel and macOS Apple Silicon
55
build-mac:
6-
rm -f out/ferium-macos-x64.zip out/ferium-macos-arm.zip
7-
mkdir -p out
8-
cargo build --target=x86_64-apple-darwin --release
9-
cargo build --target=aarch64-apple-darwin --release
10-
zip -r out/ferium-macos-x64.zip -j target/x86_64-apple-darwin/release/ferium
11-
zip -r out/ferium-macos-arm.zip -j target/aarch64-apple-darwin/release/ferium
6+
rm -f out/ferium-macos-x64.zip out/ferium-macos-arm.zip
7+
mkdir -p out
8+
cargo build --target=x86_64-apple-darwin --release
9+
cargo build --target=aarch64-apple-darwin --release
10+
zip -r out/ferium-macos-x64.zip -j target/x86_64-apple-darwin/release/ferium
11+
zip -r out/ferium-macos-arm.zip -j target/aarch64-apple-darwin/release/ferium
1212

1313
# Build for Windows MSVC
1414
build-win:
15-
if (Test-Path -Path ".\out\ferium-windows-msvc.zip") { Remove-Item -Path ".\out\ferium-windows-msvc.zip" }
16-
if (-Not (Test-Path -Path ".\out")) { New-Item -Name "out" -ItemType Directory }
17-
cargo build --target=x86_64-pc-windows-msvc --release
18-
Compress-Archive -Path "target\x86_64-pc-windows-msvc\release\ferium.exe" -DestinationPath "out\ferium-windows-msvc.zip"
15+
if (Test-Path -Path ".\out\ferium-windows-msvc.zip") { Remove-Item -Path ".\out\ferium-windows-msvc.zip" }
16+
if (-Not (Test-Path -Path ".\out")) { New-Item -Name "out" -ItemType Directory }
17+
cargo build --target=x86_64-pc-windows-msvc --release
18+
Compress-Archive -Path "target\x86_64-pc-windows-msvc\release\ferium.exe" -DestinationPath "out\ferium-windows-msvc.zip"
1919

2020
# Build for GNU Linux and GNU Windows (e.g. cygwin)
2121
build-linux:
22-
rm -f out/ferium-linux-gnu.zip out/ferium-windows-gnu.zip
23-
mkdir -p out
24-
cargo build --target=x86_64-pc-windows-gnu --release
25-
cargo build --target=x86_64-unknown-linux-gnu --release
26-
zip -r out/ferium-linux-gnu.zip -j target/x86_64-unknown-linux-gnu/release/ferium
27-
zip -r out/ferium-windows-gnu.zip -j target/x86_64-pc-windows-gnu/release/ferium.exe
22+
rm -f out/ferium-linux-gnu.zip out/ferium-windows-gnu.zip
23+
mkdir -p out
24+
cargo build --target=x86_64-pc-windows-gnu --release
25+
cargo build --target=x86_64-unknown-linux-gnu --release
26+
zip -r out/ferium-linux-gnu.zip -j target/x86_64-unknown-linux-gnu/release/ferium
27+
zip -r out/ferium-windows-gnu.zip -j target/x86_64-pc-windows-gnu/release/ferium.exe
2828

2929
# Run clippy lints
3030
lint:
31-
cargo clippy -- \
32-
-D clippy::all \
33-
-D clippy::perf \
34-
-D clippy::style \
35-
-D clippy::cargo \
36-
-D clippy::suspicious \
37-
-D clippy::complexity \
38-
-W clippy::nursery \
39-
-W clippy::pedantic \
40-
-A clippy::too-many-lines \
41-
-A clippy::non-ascii-literal \
42-
-A clippy::single-match-else \
43-
-A clippy::let-underscore-drop \
44-
-A clippy::multiple-crate-versions
31+
cargo clippy -- \
32+
-D clippy::all \
33+
-D clippy::perf \
34+
-D clippy::style \
35+
-D clippy::cargo \
36+
-D clippy::suspicious \
37+
-D clippy::complexity \
38+
-W clippy::nursery \
39+
-W clippy::pedantic \
40+
-A clippy::too-many-lines \
41+
-A clippy::non-ascii-literal \
42+
-A clippy::single-match-else \
43+
-A clippy::let-underscore-drop \
44+
-A clippy::multiple-crate-versions
4545

4646
# Install Ferium to cargo's binary folder
4747
install:
48-
cargo install --force --path .
48+
cargo install --force --path .
4949

5050
# Install Ferium to cargo's binary folder but debug
5151
install-dev:
52-
cargo install --debug --force --path .
52+
cargo install --debug --force --path .
5353

5454
clean:
55-
cargo clean
56-
rm -rf out
57-
rm -rf tests/mods
58-
rm -rf tests/configs/running
55+
cargo clean
56+
rm -rf out
57+
rm -rf tests/mods
58+
rm -rf tests/configs/running

rustfmt.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use_field_init_shorthand = true
99
overflow_delimited_expr = true
1010
imports_granularity = "Crate"
1111
spaces_around_ranges = true
12-
trailing_semicolon = false
1312
hex_literal_case = "Upper"
1413
normalize_comments = true
1514
unstable_features = true
@@ -19,5 +18,5 @@ report_todo = "Always"
1918
newline_style = "Unix"
2019
fn_single_line = true
2120
wrap_comments = true
22-
hard_tabs = true
21+
hard_tabs = false
2322
tab_spaces = 4

src/cli.rs

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -8,117 +8,117 @@ use std::path::PathBuf;
88
#[clap(propagate_version = true)]
99
#[clap(arg_required_else_help = true)]
1010
pub struct Ferium {
11-
#[clap(subcommand)]
12-
pub subcommand: SubCommands,
13-
#[clap(long)]
14-
#[clap(hide = true)]
15-
#[clap(help("Nur zum testen"))]
16-
pub config_file: Option<PathBuf>,
11+
#[clap(subcommand)]
12+
pub subcommand: SubCommands,
13+
#[clap(long)]
14+
#[clap(hide = true)]
15+
#[clap(help("Nur zum testen"))]
16+
pub config_file: Option<PathBuf>,
1717
}
1818

1919
#[derive(Subcommand)]
2020
pub enum SubCommands {
21-
#[clap(about("Add a Modrinth mod to the profile"))]
22-
AddModrinth {
23-
#[clap(help("The project ID is specified at the bottom of the left sidebar under 'Technical information'\nYou can also use the project slug for this"))]
24-
project_id: String,
25-
},
26-
#[clap(about("Add a GitHub repository to the profile"))]
27-
AddGithub {
28-
#[clap(help("The repository owner's username"))]
29-
owner: String,
30-
#[clap(help("The name of the repository"))]
31-
name: String,
32-
},
33-
#[clap(about("Add a CurseForge mod to the profile"))]
34-
AddCurseforge {
35-
#[clap(help("The project ID is specified at the right sidebar under 'About Project'"))]
36-
project_id: i32,
37-
},
38-
#[clap(about("List all the mods in the profile, and with some their metadata if verbose"))]
39-
List {
40-
#[clap(long, short)]
41-
#[clap(help("Show information about the mod"))]
42-
verbose: bool,
43-
},
44-
#[clap(arg_required_else_help = true)]
45-
#[clap(about("Create, configure, or remove the current profile"))]
46-
Profile {
47-
#[clap(subcommand)]
48-
subcommand: ProfileSubCommands,
49-
},
50-
#[clap(about("Remove a mod or repository from the profile\nOptionally, provide a list of names of the mods to remove"))]
51-
Remove {
52-
#[clap(long)]
53-
#[clap(name("mod-name"))]
54-
#[clap(help("A case-insensitive name of a mod to remove\nYou can repeat this option to remove multiple mods\nIf one or more of the mod names provided does not exist, the program will error out without changing anything in the config"))]
55-
mod_names: Option<Vec<String>>,
56-
},
57-
#[clap(about("Switch between different profiles\nOptionally, provide the name of the profile to switch to"))]
58-
Switch {
59-
#[clap(long)]
60-
#[clap(help("The name of the profile to switch to"))]
61-
profile_name: Option<String>,
62-
},
63-
#[clap(about("Sort all your mods in alphabetical order"))]
64-
Sort,
65-
#[clap(about("Download and install the latest version of the mods specified"))]
66-
Upgrade {
67-
#[clap(long)]
68-
#[clap(help(
69-
"Do not check for the full game version, only check for the major and minor versions
70-
\rSome Minecraft versions (e.g. 1.18 & 1.18.1) are compatible with each other,
71-
\rthis option allows you to use older, but still compatible, versions of a mod that might not have yet updated to the latest version"
72-
))]
73-
no_patch_check: bool,
74-
},
21+
#[clap(about("Add a Modrinth mod to the profile"))]
22+
AddModrinth {
23+
#[clap(help("The project ID is specified at the bottom of the left sidebar under 'Technical information'\nYou can also use the project slug for this"))]
24+
project_id: String,
25+
},
26+
#[clap(about("Add a GitHub repository to the profile"))]
27+
AddGithub {
28+
#[clap(help("The repository owner's username"))]
29+
owner: String,
30+
#[clap(help("The name of the repository"))]
31+
name: String,
32+
},
33+
#[clap(about("Add a CurseForge mod to the profile"))]
34+
AddCurseforge {
35+
#[clap(help("The project ID is specified at the right sidebar under 'About Project'"))]
36+
project_id: i32,
37+
},
38+
#[clap(about("List all the mods in the profile, and with some their metadata if verbose"))]
39+
List {
40+
#[clap(long, short)]
41+
#[clap(help("Show information about the mod"))]
42+
verbose: bool,
43+
},
44+
#[clap(arg_required_else_help = true)]
45+
#[clap(about("Create, configure, or remove the current profile"))]
46+
Profile {
47+
#[clap(subcommand)]
48+
subcommand: ProfileSubCommands,
49+
},
50+
#[clap(about("Remove a mod or repository from the profile\nOptionally, provide a list of names of the mods to remove"))]
51+
Remove {
52+
#[clap(long)]
53+
#[clap(name("mod-name"))]
54+
#[clap(help("A case-insensitive name of a mod to remove\nYou can repeat this option to remove multiple mods\nIf one or more of the mod names provided does not exist, the program will error out without changing anything in the config"))]
55+
mod_names: Option<Vec<String>>,
56+
},
57+
#[clap(about("Switch between different profiles\nOptionally, provide the name of the profile to switch to"))]
58+
Switch {
59+
#[clap(long)]
60+
#[clap(help("The name of the profile to switch to"))]
61+
profile_name: Option<String>,
62+
},
63+
#[clap(about("Sort all your mods in alphabetical order"))]
64+
Sort,
65+
#[clap(about("Download and install the latest version of the mods specified"))]
66+
Upgrade {
67+
#[clap(long)]
68+
#[clap(help(
69+
"Do not check for the full game version, only check for the major and minor versions
70+
\rSome Minecraft versions (e.g. 1.18 & 1.18.1) are compatible with each other,
71+
\rthis option allows you to use older, but still compatible, versions of a mod that might not have yet updated to the latest version"
72+
))]
73+
no_patch_check: bool,
74+
},
7575
}
7676

7777
#[derive(Subcommand)]
7878
pub enum ProfileSubCommands {
79-
#[clap(about(
80-
"Configure the current profile's Minecraft version, mod loader, and output directory\nOptionally, provide setting(s) to change as option(s)"
81-
))]
82-
Configure {
83-
#[clap(long)]
84-
#[clap(help("The Minecraft version to check compatibility for"))]
85-
game_version: Option<String>,
86-
#[clap(long)]
87-
#[clap(arg_enum)]
88-
#[clap(help("The mod loader to check compatibility for"))]
89-
mod_loader: Option<libium::config::structs::ModLoaders>,
90-
#[clap(long)]
91-
#[clap(help("The name of the profile"))]
92-
name: Option<String>,
93-
#[clap(long)]
94-
#[clap(help("The directory to output mods to"))]
95-
output_dir: Option<PathBuf>,
96-
},
97-
#[clap(about("Create a new profile\nOptionally, provide ALL the options to create the profile without the UI"))]
98-
Create {
99-
#[clap(long)]
100-
#[clap(help("The Minecraft version to check compatibility for"))]
101-
game_version: Option<String>,
102-
#[clap(long)]
103-
#[clap(help("Do not check whether the game version exists or not"))]
104-
force_game_version: bool,
105-
#[clap(long)]
106-
#[clap(arg_enum)]
107-
#[clap(help("The mod loader to check compatibility for"))]
108-
mod_loader: Option<libium::config::structs::ModLoaders>,
109-
#[clap(long)]
110-
#[clap(help("The name of the profile"))]
111-
name: Option<String>,
112-
#[clap(long)]
113-
#[clap(help("The directory to output mods to"))]
114-
output_dir: Option<PathBuf>,
115-
},
116-
#[clap(about("Delete a profile\nOptionally, provide the name of the profile to delete\nAfter deletion, the first profile will be selected"))]
117-
Delete {
118-
#[clap(long)]
119-
#[clap(help("The name of the profile to delete"))]
120-
profile_name: Option<String>,
121-
},
122-
#[clap(about("List all the profiles with their data"))]
123-
List,
79+
#[clap(about(
80+
"Configure the current profile's Minecraft version, mod loader, and output directory\nOptionally, provide setting(s) to change as option(s)"
81+
))]
82+
Configure {
83+
#[clap(long)]
84+
#[clap(help("The Minecraft version to check compatibility for"))]
85+
game_version: Option<String>,
86+
#[clap(long)]
87+
#[clap(arg_enum)]
88+
#[clap(help("The mod loader to check compatibility for"))]
89+
mod_loader: Option<libium::config::structs::ModLoaders>,
90+
#[clap(long)]
91+
#[clap(help("The name of the profile"))]
92+
name: Option<String>,
93+
#[clap(long)]
94+
#[clap(help("The directory to output mods to"))]
95+
output_dir: Option<PathBuf>,
96+
},
97+
#[clap(about("Create a new profile\nOptionally, provide ALL the options to create the profile without the UI"))]
98+
Create {
99+
#[clap(long)]
100+
#[clap(help("The Minecraft version to check compatibility for"))]
101+
game_version: Option<String>,
102+
#[clap(long)]
103+
#[clap(help("Do not check whether the game version exists or not"))]
104+
force_game_version: bool,
105+
#[clap(long)]
106+
#[clap(arg_enum)]
107+
#[clap(help("The mod loader to check compatibility for"))]
108+
mod_loader: Option<libium::config::structs::ModLoaders>,
109+
#[clap(long)]
110+
#[clap(help("The name of the profile"))]
111+
name: Option<String>,
112+
#[clap(long)]
113+
#[clap(help("The directory to output mods to"))]
114+
output_dir: Option<PathBuf>,
115+
},
116+
#[clap(about("Delete a profile\nOptionally, provide the name of the profile to delete\nAfter deletion, the first profile will be selected"))]
117+
Delete {
118+
#[clap(long)]
119+
#[clap(help("The name of the profile to delete"))]
120+
profile_name: Option<String>,
121+
},
122+
#[clap(about("List all the profiles with their data"))]
123+
List,
124124
}

0 commit comments

Comments
 (0)