Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
1cf349c3c6
commit
03784be431
@ -275,7 +275,6 @@ impl DaggerCuddlePlease {
|
|||||||
args: &CuddlePleaseSrcArgs,
|
args: &CuddlePleaseSrcArgs,
|
||||||
) -> eyre::Result<()> {
|
) -> eyre::Result<()> {
|
||||||
let build_image = client.container().from(&args.cuddle_image);
|
let build_image = client.container().from(&args.cuddle_image);
|
||||||
|
|
||||||
let res = build_image
|
let res = build_image
|
||||||
.with_secret_variable(
|
.with_secret_variable(
|
||||||
"CUDDLE_PLEASE_TOKEN",
|
"CUDDLE_PLEASE_TOKEN",
|
||||||
@ -317,8 +316,31 @@ Host *
|
|||||||
owner: Some("root"),
|
owner: Some("root"),
|
||||||
permissions: Some(700),
|
permissions: Some(700),
|
||||||
},
|
},
|
||||||
)
|
);
|
||||||
.with_exec(vec![
|
|
||||||
|
let remote_url = res
|
||||||
|
.with_exec(vec!["git", "config", "--get", "remote.origin.url"])
|
||||||
|
.stdout()
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
let res = if remote_url.starts_with("http") {
|
||||||
|
res.with_exec(vec![
|
||||||
|
"git",
|
||||||
|
"config",
|
||||||
|
"--global",
|
||||||
|
&format!(
|
||||||
|
"url.ssh://git@{}/.insteadOf",
|
||||||
|
remote_url
|
||||||
|
.trim_start_matches("https://")
|
||||||
|
.trim_start_matches("http://")
|
||||||
|
),
|
||||||
|
&remote_url,
|
||||||
|
])
|
||||||
|
} else {
|
||||||
|
res
|
||||||
|
};
|
||||||
|
|
||||||
|
let res = res.with_exec(vec![
|
||||||
"cuddle-please",
|
"cuddle-please",
|
||||||
"release",
|
"release",
|
||||||
&format!(
|
&format!(
|
||||||
|
Loading…
Reference in New Issue
Block a user