Add api key, gpg key, and move flatpakrepo

This commit is contained in:
2026-08-01 21:56:05 +02:00
parent 73bbb87f78
commit a4c19b5f1f
4 changed files with 44 additions and 2 deletions
+12
View File
@@ -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);