Skip to content

Commit 65f9a65

Browse files
committed
Improve documentation in meta
1 parent d4fd0a1 commit 65f9a65

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

mullvad-update/meta/src/artifacts.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Generate metadata for installer artifacts
2+
23
use anyhow::Context;
34
use std::path::Path;
45
use tokio::{
@@ -8,7 +9,10 @@ use tokio::{
89

910
use mullvad_update::{format, hash};
1011

11-
/// Generate `format::Installer`
12+
/// Generate `format::Installer` for a given `artifact`.
13+
///
14+
/// The presence of the files relative to `base_urls` is not verified.
15+
/// See [crate::config::Config::base_urls] for the assumptions made.
1216
pub async fn generate_installer_details(
1317
architecture: format::Architecture,
1418
base_urls: &[String],

mullvad-update/meta/src/config.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub struct Config {
1515
}
1616

1717
impl Config {
18+
/// Try to load [CONFIG_FILENAME] from the working directory, create one if it does not exist.
1819
pub async fn load_or_create() -> anyhow::Result<Self> {
1920
match fs::read_to_string(CONFIG_FILENAME).await {
2021
Ok(toml_str) => toml::from_str(&toml_str).context("Failed to parse TOML file"),

mullvad-update/meta/src/github.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
//! Tools for the GitHub repository.
2+
13
use anyhow::Context;
24

3-
// Obtain changes.txt for a given version/tag from the GitHub repository
5+
/// Obtain changes.txt for a given version/tag from the GitHub repository
46
pub async fn fetch_changes_text(version: &mullvad_version::Version) -> anyhow::Result<String> {
57
let github_changes_url = format!("https://raw.githubusercontent.com/mullvad/mullvadvpn-app/refs/tags/{version}/desktop/packages/mullvad-vpn/changes.txt");
68
let changes = reqwest::get(github_changes_url)

mullvad-update/meta/src/io_util.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! File and I/O utilities
2+
13
use std::path::Path;
24

35
use anyhow::Context;

mullvad-update/meta/src/platform.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl Platform {
140140

141141
let signed_path = self.signed_path();
142142

143-
// Confirm if file exists
143+
// Require confirmation if a signed file exists
144144
if !assume_yes && signed_path.exists() {
145145
let msg = format!(
146146
"This will replace the existing file at {}. Continue?",

0 commit comments

Comments
 (0)