Skip to content

Commit

Permalink
Support rustrover-eap versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
navarroaxel committed Aug 14, 2024
1 parent 229b94d commit 6e535b2
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 186 deletions.
447 changes: 276 additions & 171 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "checkupdates-external"
version = "0.1.0"
authors = ["Axel Navarro <[email protected]>"]
edition = "2018"
edition = "2024"
repository = "https://github.com/navarroaxel/archlinux-checkupdates-external"
homepage = "https://github.com/navarroaxel/archlinux-checkupdates-external"
readme = "README.md"
Expand All @@ -17,5 +17,5 @@ teamviewer = { path = "crates/teamviewer" }
yum = { path = "crates/yum" }

futures = "0.3.30"
reqwest = { version = "0.12.4", features = ["json", "gzip"] }
tokio = { version = "1.37.0", features = ["full"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
tokio = { version = "1.39.2", features = ["full"] }
4 changes: 2 additions & 2 deletions crates/aur/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"

[dependencies]
futures = "0.3.30"
reqwest = { version = "0.12.4", features = ["json", "gzip"] }
serde = { version = "1.0.202", features = ["derive"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
serde = { version = "1.0.207", features = ["derive"] }
2 changes: 1 addition & 1 deletion crates/chrome/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
aur = { path = "../aur" }
yum = { path = "../yum" }

reqwest = { version = "0.12.4", features = ["json", "gzip"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
2 changes: 1 addition & 1 deletion crates/edge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
aur = { path = "../aur" }
yum = { path = "../yum" }

reqwest = { version = "0.12.4", features = ["json", "gzip"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
4 changes: 2 additions & 2 deletions crates/jetbrains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ edition = "2021"
[dependencies]
aur = { path = "../aur" }

reqwest = { version = "0.12.4", features = ["json", "gzip"] }
serde = { version = "1.0.202", features = ["derive"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
serde = { version = "1.0.207", features = ["derive"] }
serde-xml-rs = "0.6.0"
15 changes: 14 additions & 1 deletion crates/jetbrains/src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ fn print_update(package: &str, version: String, new_version: &str) {
}
}

fn get_package_pre_build(version: String) -> String {
let mut splitter = version.split("pre+");
splitter.next();
splitter.next().unwrap().to_string()
}

fn print_jetbrains_update(
channel_name: &str,
package: &AurPackage,
Expand All @@ -47,7 +53,14 @@ fn print_jetbrains_update(
let build = channel.builds.first().unwrap();
let mut version = remove_epoch(package.get_package_version());
let new_version;
if is_eap {
if package.name == "rustrover-eap" {
if version.contains("pre") {
version = get_package_pre_build(version);
new_version = build.full_number.as_ref().unwrap();
} else {
new_version = &build.version;
}
} else if is_eap {
version = get_package_build(version);
new_version = build.full_number.as_ref().unwrap();
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/mongodb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
aur = { path = "../aur" }
yum = { path = "../yum" }

reqwest = { version = "0.12.4", features = ["json", "gzip"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
2 changes: 1 addition & 1 deletion crates/teamviewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
aur = { path = "../aur" }
yum = { path = "../yum" }

reqwest = { version = "0.12.4", features = ["json", "gzip"] }
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
6 changes: 3 additions & 3 deletions crates/yum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ edition = "2021"
aur = { path = "../aur" }

itertools = "0.13.0"
libflate = "2.0.0"
reqwest = { version = "0.12.4", features = ["json", "gzip"] }
libflate = "2.1.0"
reqwest = { version = "0.12.5", features = ["json", "gzip"] }
semver = "1.0.23"
serde = { version = "1.0.202", features = ["derive"] }
serde = { version = "1.0.207", features = ["derive"] }
serde-xml-rs = "0.6.0"
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ async fn check_teamviewer_updates() -> Result<(), Error> {

async fn check_jetbrains_updates() -> Result<(), Error> {
let jetbrains_products = vec![
vec!["aqua", "Aqua", "QA-RELEASE-licensing-RELEASE"],
vec!["aqua-eap", "Aqua", "QA-EAP-licensing-EAP"],
vec!["clion", "CLion", "CL-RELEASE-licensing-RELEASE"],
vec!["datagrip", "DataGrip", "DB-RELEASE-licensing-RELEASE"],
vec!["goland", "GoLand", "GO-RELEASE-licensing-RELEASE"],
Expand Down

0 comments on commit 6e535b2

Please sign in to comment.