Skip to content

Commit 7ad6dc5

Browse files
committed
feat: upgrade PlantUML to 1.2024.7 switching to the GitHub repository
fix #12
1 parent a596ac7 commit 7ad6dc5

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/constants.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ pub fn get_default_tera_discovery_pattern() -> String {
106106
TERA_DISCOVERY_PATTERN.to_string()
107107
}
108108

109-
pub const PLANTUML_VERSION: &str = "1.2022.4";
109+
pub const PLANTUML_VERSION: &str = "1.2024.7";
110110

111111
pub fn get_default_plantuml_version() -> String {
112112
PLANTUML_VERSION.to_string()
113113
}
114114

115-
pub const PLANTUML_JAR: &str = ".cache/plantuml-1.2022.4.jar";
115+
pub const PLANTUML_JAR: &str = ".cache/plantuml-1.2024.7.jar";
116116

117117
pub fn get_default_plantuml_jar() -> String {
118118
PLANTUML_JAR.to_string()

src/plantuml.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ use std::io::Write;
44
use std::path::Path;
55
use std::process::Command;
66

7-
use anyhow::Result;
8-
97
use crate::utils::create_parent_directory;
8+
use anyhow::Result;
109

1110
#[derive(Debug)]
1211
pub struct PlantUML {
@@ -49,10 +48,9 @@ impl PlantUML {
4948
Ok(())
5049
}
5150
pub fn download(&self) -> Result<()> {
52-
// https://netcologne.dl.sourceforge.net/project/plantuml/1.2022.4/plantuml.1.2022.4.jar
53-
// https://downloads.sourceforge.net/project/plantuml/1.2022.4/plantuml.1.2022.4.jar
51+
// https://github.com/plantuml/plantuml/releases/download/v1.2024.7/plantuml-1.2024.7.jar
5452
let url = format!(
55-
"https://downloads.sourceforge.net/project/plantuml/{}/plantuml.{}.jar",
53+
"https://github.com/plantuml/plantuml/releases/download/v{}/plantuml-{}.jar",
5654
self.plantuml_version, self.plantuml_version,
5755
);
5856

@@ -70,6 +68,7 @@ impl PlantUML {
7068
anyhow::Error::new(e).context(format!("unable to open {}", &self.plantuml_jar))
7169
})?;
7270

71+
log::info!("download the PlantUML jar from {}", url);
7372
reqwest::blocking::get(&url)
7473
.map_err(|e| anyhow::Error::new(e).context(format!("unable to download {}", &url)))?
7574
.copy_to(&mut destination_file)

0 commit comments

Comments
 (0)