aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-06-16 02:17:34 +0000
committerFuwn <[email protected]>2021-06-16 02:17:34 +0000
commit14ea83eb76a0aff0750a6b4706ac14ea8dc397e0 (patch)
tree62bf5b6ee2730891d8042edc5a35e63045751c82
parentchore(github): move funding information (diff)
downloadwhirl-14ea83eb76a0aff0750a6b4706ac14ea8dc397e0.tar.xz
whirl-14ea83eb76a0aff0750a6b4706ac14ea8dc397e0.zip
feat(config): create `version` key
At the moment, the `version` key is never accessed, but once Whirl's "`1.0`" release is out, the configuration schema will need to be standardized, the `version` key will regulate that and also ensure no one is left behind when updating. BREAKING CHANGE: `version` key is created
-rw-r--r--.whirl/Config.example.toml2
-rw-r--r--crates/whirl_config/Config.default.toml2
-rw-r--r--crates/whirl_config/src/lib.rs2
3 files changed, 6 insertions, 0 deletions
diff --git a/.whirl/Config.example.toml b/.whirl/Config.example.toml
index aa2d684..3bf6fa0 100644
--- a/.whirl/Config.example.toml
+++ b/.whirl/Config.example.toml
@@ -1,5 +1,7 @@
# See more keys and their definitions at https://whirlsplash.org/docs/whirl/configuration
+version = "0.1.0"
+
[whirlsplash]
worldsmaster_username = "WORLDSMASTER"
ip = "0.0.0.0"
diff --git a/crates/whirl_config/Config.default.toml b/crates/whirl_config/Config.default.toml
index aa2d684..3bf6fa0 100644
--- a/crates/whirl_config/Config.default.toml
+++ b/crates/whirl_config/Config.default.toml
@@ -1,5 +1,7 @@
# See more keys and their definitions at https://whirlsplash.org/docs/whirl/configuration
+version = "0.1.0"
+
[whirlsplash]
worldsmaster_username = "WORLDSMASTER"
ip = "0.0.0.0"
diff --git a/crates/whirl_config/src/lib.rs b/crates/whirl_config/src/lib.rs
index 7920ade..81b71d7 100644
--- a/crates/whirl_config/src/lib.rs
+++ b/crates/whirl_config/src/lib.rs
@@ -45,6 +45,7 @@ use crate::structures::{
#[derive(Serialize, Deserialize, Debug)]
pub struct Config {
+ pub version: String,
pub whirlsplash: WhirlsplashConfig,
pub distributor: DistributorConfig,
pub hub: HubConfig,
@@ -87,6 +88,7 @@ impl Config {
impl Default for Config {
fn default() -> Self {
Self {
+ version: "0.1.0".to_string(),
whirlsplash: WhirlsplashConfig {
worldsmaster_username: "WORLDSMASTER".to_string(),
ip: "0.0.0.0".to_string(),