Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More optional config #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ pub struct RepoConfig {
pub gpg_key_content: Option<String>,
pub base_url: Option<String>,
pub runtime_repo_url: Option<String>,
#[serde(default)]
pub subsets: HashMap<String, SubsetConfig>,
pub post_publish_script: Option<String>,
#[serde(default)]
Expand All @@ -229,6 +230,10 @@ fn default_numcpu() -> u32 {
num_cpus::get() as u32
}

fn default_build_repo_base() -> PathBuf {
PathBuf::from("build-repo")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, this needs to be a full path and a default isn't clear. I'll drop this commit.

}

#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub struct Config {
Expand All @@ -245,6 +250,7 @@ pub struct Config {
#[serde(default, deserialize_with = "from_opt_base64")]
pub repo_secret: Option<Vec<u8>>,
pub repos: HashMap<String, RepoConfig>,
#[serde(default = "default_build_repo_base")]
pub build_repo_base: PathBuf,
pub build_gpg_key: Option<String>,
#[serde(skip)]
Expand Down