Add api key, gpg key, and move flatpakrepo
This commit is contained in:
+12
@@ -19,6 +19,8 @@ mod util;
|
||||
#[derive(Default)]
|
||||
struct SrvState {
|
||||
repo: Mutex<PathBuf>,
|
||||
api_key: String,
|
||||
gpg_key_id: String,
|
||||
}
|
||||
|
||||
type SharedState = Arc<SrvState>;
|
||||
@@ -33,6 +35,14 @@ struct Opt {
|
||||
#[clap(long, env = "FR_REPO_PATH")]
|
||||
repo: PathBuf,
|
||||
|
||||
/// GPG key id for signing the repository
|
||||
#[clap(long, env = "FR_GPG_KEY_ID")]
|
||||
gpg: String,
|
||||
|
||||
/// API key for uploading flatpak
|
||||
#[clap(long, env = "FR_API_KEY")]
|
||||
api_key: String,
|
||||
|
||||
#[clap(long, env = "RUST_LOG", default_value = "debug")]
|
||||
log_level: String,
|
||||
}
|
||||
@@ -60,6 +70,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
|
||||
let state = SrvState {
|
||||
repo: Mutex::new(repo.clone()),
|
||||
gpg_key_id: opt.gpg,
|
||||
api_key: opt.api_key,
|
||||
};
|
||||
let state: SharedState = Arc::new(state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user