chore(release): 0.2.0

This commit is contained in:
2023-08-01 17:50:43 +02:00
parent e6f84f744d
commit 1958d635cd
4 changed files with 73 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ impl Command {
pub fn execute(self, current_dir: Option<&Path>) -> anyhow::Result<()> {
let config = self.build_config(current_dir)?;
let git_client = self.get_git(config.get_source())?;
let gitea_client = self.get_gitea_client();
let gitea_client = self.get_gitea_client(&config);
match &self.commands {
Some(Commands::Release {}) => {
@@ -139,11 +139,11 @@ impl Command {
}
}
fn get_gitea_client(&self) -> DynRemoteGitClient {
fn get_gitea_client(&self, config: &PleaseConfig) -> DynRemoteGitClient {
match self.global.engine {
cuddle_please_misc::RemoteEngine::Local => Box::new(LocalGitClient::new()),
cuddle_please_misc::RemoteEngine::Gitea => Box::new(GiteaClient::new(
&self.config.api_url.clone().expect("api_url to be set"),
config.get_api_url(),
self.global.token.as_deref(),
)),
}