feat: ci:main script for ci
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-03 16:09:45 +02:00
parent f7d02bad10
commit 8ee05136df
10 changed files with 314 additions and 114 deletions

View File

@@ -139,7 +139,7 @@ impl Command {
tracing_subscriber::fmt().with_env_filter(env_filter).init();
}
return Ok((config, git_client, gitea_client));
Ok((config, git_client, gitea_client))
}
fn build_config(&self, current_dir: Option<&Path>) -> Result<PleaseConfig, anyhow::Error> {

View File

@@ -165,6 +165,12 @@ fn setup_git(path: &Path) -> anyhow::Result<()> {
let stderr = std::str::from_utf8(&output.stderr)?;
tracing::debug!(stdout = stdout, stderr = stderr, "git init");
exec_git(path, &["checkout", "-b", "main"])?;
exec_git(path, &["config", "user.name", "test"])?;
exec_git(path, &["config", "user.email", "test@test.com"])?;
exec_git(path, &["config", "init.defaultBranch", "main"])?;
Ok(())
}