fix(ci): only set local url instead of insteadOf
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-08-12 21:12:45 +02:00
parent 07c593bb08
commit e2f1d79031
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -324,19 +324,15 @@ Host *
.await?; .await?;
let res = if remote_url.starts_with("http") { let res = if remote_url.starts_with("http") {
res.with_exec(vec![ let new_remote_url = format!(
"git", "ssh://git@{}",
"config",
"--global",
&format!(
"url.ssh://git@{}/.insteadOf",
remote_url remote_url
.trim() .trim()
.trim_start_matches("https://") .trim_start_matches("https://")
.trim_start_matches("http://") .trim_start_matches("http://")
), );
remote_url.trim(), println!("new remote_url: {}", new_remote_url);
]) res.with_exec(vec!["git", "remote", "set-url", "origin", &new_remote_url])
} else { } else {
res res
}; };