Skip to content

Commit

Permalink
Fix #47
Browse files Browse the repository at this point in the history
  • Loading branch information
theRookieCoder committed May 8, 2022
1 parent a303015 commit a90fc61
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for Ferium

## `v3.28.1`
### 08.05.2022

- Adding github mods now checks tried to get the latest compatible version
- Fixed [#47](https://github.com/theRookieCoder/ferium/issues/47) by using Libium 1.11.4

## `v3.28.0`
### 08.05.2022

Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ferium"
version = "3.28.0"
version = "3.28.1"
edition = "2021"
authors = ["Ilesh Thiada (theRookieCoder) <ileshkt@gmail.com>", "薛詠謙 (KyleUltimate)", "Daniel Hauck (SolidTux)"]
description = "Ferium is a CLI program for managing Minecraft mods from Modrinth, CurseForge, and Github Releases"
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,13 @@ async fn actual_main(cli_app: Ferium) -> Result<()> {
dont_check_mod_loader,
} => {
check_internet().await?;
eprint!("Adding mod... ");
let repo = libium::add::github(
add::github(
github.repos(owner, name),
profile,
Some(!dont_check_game_version),
Some(!dont_check_mod_loader),
)
.await?;
println!("{} ({})", *TICK, repo.name);
},
SubCommands::AddCurseforge {
project_id,
Expand Down
27 changes: 27 additions & 0 deletions src/subcommands/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ use ferinth::structures::version_structs::DependencyType;
use ferinth::Ferinth;
use furse::{structures::file_structs::FileRelationType, Furse};
use libium::{add, config, upgrade};
use octocrab::repos::RepoHandler;

pub async fn github(
repo_handler: RepoHandler<'_>,
profile: &mut config::structs::Profile,
should_check_game_version: Option<bool>,
should_check_mod_loader: Option<bool>,
) -> Result<()> {
eprint!("Adding mod... ");
let repo = libium::add::github(
&repo_handler,
profile,
should_check_game_version,
should_check_mod_loader,
)
.await?;
upgrade::github(
&repo_handler,
&profile.game_version,
&profile.mod_loader,
should_check_game_version,
should_check_mod_loader,
)
.await?;
println!("{} ({})", *TICK, repo.name);
Ok(())
}

pub async fn modrinth(
modrinth: &Ferinth,
Expand Down

0 comments on commit a90fc61

Please sign in to comment.