summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-update/meta/src/artifacts.rs6
-rw-r--r--mullvad-update/meta/src/config.rs1
-rw-r--r--mullvad-update/meta/src/github.rs4
-rw-r--r--mullvad-update/meta/src/io_util.rs2
-rw-r--r--mullvad-update/meta/src/platform.rs2
5 files changed, 12 insertions, 3 deletions
diff --git a/mullvad-update/meta/src/artifacts.rs b/mullvad-update/meta/src/artifacts.rs
index 5b9d6f783b..968c86416e 100644
--- a/mullvad-update/meta/src/artifacts.rs
+++ b/mullvad-update/meta/src/artifacts.rs
@@ -1,4 +1,5 @@
//! Generate metadata for installer artifacts
+
use anyhow::Context;
use std::path::Path;
use tokio::{
@@ -8,7 +9,10 @@ use tokio::{
use mullvad_update::{format, hash};
-/// Generate `format::Installer`
+/// Generate `format::Installer` for a given `artifact`.
+///
+/// The presence of the files relative to `base_urls` is not verified.
+/// See [crate::config::Config::base_urls] for the assumptions made.
pub async fn generate_installer_details(
architecture: format::Architecture,
base_urls: &[String],
diff --git a/mullvad-update/meta/src/config.rs b/mullvad-update/meta/src/config.rs
index 378726587b..52a9ae8576 100644
--- a/mullvad-update/meta/src/config.rs
+++ b/mullvad-update/meta/src/config.rs
@@ -15,6 +15,7 @@ pub struct Config {
}
impl Config {
+ /// Try to load [CONFIG_FILENAME] from the working directory, create one if it does not exist.
pub async fn load_or_create() -> anyhow::Result<Self> {
match fs::read_to_string(CONFIG_FILENAME).await {
Ok(toml_str) => toml::from_str(&toml_str).context("Failed to parse TOML file"),
diff --git a/mullvad-update/meta/src/github.rs b/mullvad-update/meta/src/github.rs
index 136ffe21a8..c2e6b99bb0 100644
--- a/mullvad-update/meta/src/github.rs
+++ b/mullvad-update/meta/src/github.rs
@@ -1,6 +1,8 @@
+//! Tools for the GitHub repository.
+
use anyhow::Context;
-// Obtain changes.txt for a given version/tag from the GitHub repository
+/// Obtain changes.txt for a given version/tag from the GitHub repository
pub async fn fetch_changes_text(version: &mullvad_version::Version) -> anyhow::Result<String> {
let github_changes_url = format!("https://raw.githubusercontent.com/mullvad/mullvadvpn-app/refs/tags/{version}/desktop/packages/mullvad-vpn/changes.txt");
let changes = reqwest::get(github_changes_url)
diff --git a/mullvad-update/meta/src/io_util.rs b/mullvad-update/meta/src/io_util.rs
index adc24e753d..bcadc222c1 100644
--- a/mullvad-update/meta/src/io_util.rs
+++ b/mullvad-update/meta/src/io_util.rs
@@ -1,3 +1,5 @@
+//! File and I/O utilities
+
use std::path::Path;
use anyhow::Context;
diff --git a/mullvad-update/meta/src/platform.rs b/mullvad-update/meta/src/platform.rs
index 31fc145f24..0dd6c89257 100644
--- a/mullvad-update/meta/src/platform.rs
+++ b/mullvad-update/meta/src/platform.rs
@@ -140,7 +140,7 @@ impl Platform {
let signed_path = self.signed_path();
- // Confirm if file exists
+ // Require confirmation if a signed file exists
if !assume_yes && signed_path.exists() {
let msg = format!(
"This will replace the existing file at {}. Continue?",