popgetter_core/config.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
4#[serde(default)]
5pub struct Config {
6 pub base_path: String,
7}
8
9impl Default for Config {
10 fn default() -> Self {
11 Config {
12 // TODO: add fn to generate the release directory name from the CLI version directly
13 // E.g. this could be achieved with: https://docs.rs/built/latest/built/
14 base_path: "https://popgetter.blob.core.windows.net/releases/v0.2".into(),
15 }
16 }
17}
18
19impl Config {
20 pub fn dev() -> Config {
21 Config {
22 base_path: "https://popgetter.blob.core.windows.net/dev/v0.2".into(),
23 }
24 }
25}