Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
5dbaf3c87f
commit
999cc9d59f
@ -368,7 +368,7 @@ impl MainAction for LeptosService {
|
||||
.container()
|
||||
.from(update_deployments_docker_image);
|
||||
|
||||
let dep = if let Some(sock) = std::env::var("SSH_AUTH_SOCK").ok() {
|
||||
let dep = if let Ok(sock) = std::env::var("SSH_AUTH_SOCK") {
|
||||
dep.with_unix_socket("/tmp/ssh_sock", self.client.host().unix_socket(sock))
|
||||
.with_env_variable("SSH_AUTH_SOCK", "/tmp/ssh_sock")
|
||||
.with_exec(vec![
|
||||
|
@ -1,13 +1,12 @@
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
use std::{path::PathBuf};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_rust::source::RustSource;
|
||||
use dagger_sdk::Container;
|
||||
use futures::{stream, StreamExt};
|
||||
use futures::{StreamExt};
|
||||
|
||||
use crate::{
|
||||
cli,
|
||||
dagger_middleware::{DaggerMiddleware, DynMiddleware},
|
||||
rust_service::architecture::{Architecture, Os},
|
||||
MainAction, PullRequestAction,
|
||||
};
|
||||
|
@ -11,6 +11,12 @@ pub struct Apt {
|
||||
deps: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for Apt {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Apt {
|
||||
pub fn new() -> Self {
|
||||
Self { deps: Vec::new() }
|
||||
|
@ -9,6 +9,12 @@ use super::RustService;
|
||||
|
||||
pub struct AptCaCertificates {}
|
||||
|
||||
impl Default for AptCaCertificates {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl AptCaCertificates {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, HostDirectoryOpts, HostDirectoryOptsBuilder};
|
||||
use dagger_sdk::{Container};
|
||||
|
||||
use crate::{dagger_middleware::DaggerMiddleware, leptos_service::LeptosService};
|
||||
|
||||
@ -37,8 +37,8 @@ impl DaggerMiddleware for Assets {
|
||||
.fold(container, |container, (src_asset_path, dest_asset_path)| {
|
||||
let src_path = src_asset_path.display().to_string();
|
||||
let dest_path = dest_asset_path.display().to_string();
|
||||
let path = self.client.host().directory(&src_path);
|
||||
container.with_directory(&dest_path, path)
|
||||
let path = self.client.host().directory(src_path);
|
||||
container.with_directory(dest_path, path)
|
||||
});
|
||||
|
||||
Ok(container)
|
||||
|
@ -9,6 +9,12 @@ use super::RustService;
|
||||
|
||||
pub struct CargoClean;
|
||||
|
||||
impl Default for CargoClean {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl CargoClean {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, ImageMediaTypes};
|
||||
use dagger_sdk::{Container};
|
||||
|
||||
use crate::dagger_middleware::DaggerMiddleware;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, ContainerWithNewFileOptsBuilder, Socket};
|
||||
use dagger_sdk::{Container, ContainerWithNewFileOptsBuilder};
|
||||
use eyre::Context;
|
||||
|
||||
use crate::{dagger_middleware::DaggerMiddleware, leptos_service::LeptosService};
|
||||
@ -30,7 +30,7 @@ impl DaggerMiddleware for SshAgent {
|
||||
|
||||
let c = container
|
||||
.with_new_file_opts(
|
||||
format!(".ssh/config"),
|
||||
".ssh/config".to_string(),
|
||||
ContainerWithNewFileOptsBuilder::default()
|
||||
.contents(
|
||||
r#"
|
||||
@ -40,7 +40,7 @@ Host *
|
||||
|
||||
"#,
|
||||
)
|
||||
.permissions(0700 as isize)
|
||||
.permissions(0700_isize)
|
||||
.build()?,
|
||||
)
|
||||
.with_unix_socket(&sock_var, socket)
|
||||
|
@ -219,7 +219,7 @@ impl HtmxBuild {
|
||||
)
|
||||
.with_directory(
|
||||
"/mnt/app/target/site",
|
||||
builder_image.directory(format!("/mnt/src/target/site")),
|
||||
builder_image.directory("/mnt/src/target/site".to_string()),
|
||||
)
|
||||
.with_file(
|
||||
"/mnt/app/Cargo.toml",
|
||||
|
@ -198,7 +198,7 @@ impl LeptosBuild {
|
||||
)
|
||||
.with_directory(
|
||||
"/mnt/app/target/site",
|
||||
builder_image.directory(format!("/mnt/src/target/site")),
|
||||
builder_image.directory("/mnt/src/target/site".to_string()),
|
||||
)
|
||||
.with_file(
|
||||
"/mnt/app/Cargo.toml",
|
||||
|
@ -116,7 +116,7 @@ impl RustSource {
|
||||
.map(|c| format!("**/*{}*", c.replace('-', "_")))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let original_crates = crates.clone();
|
||||
let mut original_crates = crates.clone();
|
||||
original_crates.extend(exclude);
|
||||
|
||||
let exclude = original_crates.iter().map(|c| c.as_str()).collect();
|
||||
@ -130,7 +130,7 @@ impl RustSource {
|
||||
},
|
||||
);
|
||||
|
||||
return Ok(incremental_dir);
|
||||
Ok(incremental_dir)
|
||||
}
|
||||
|
||||
pub async fn get_rust_skeleton_files(
|
||||
@ -191,7 +191,7 @@ impl RustSource {
|
||||
}
|
||||
directory = create_skeleton_files(
|
||||
directory,
|
||||
rust_crate.strip_prefix(source_path).unwrap_or(&rust_crate),
|
||||
rust_crate.strip_prefix(source_path).unwrap_or(rust_crate),
|
||||
)?;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ impl RustTest {
|
||||
.with_exec(vec!["apt", "update"])
|
||||
.with_exec(deps);
|
||||
|
||||
let target_cache = self.client.cache_volume(format!("rust_target_test",));
|
||||
let target_cache = self.client.cache_volume("rust_target_test".to_string());
|
||||
|
||||
let build_options = vec!["cargo", "build", "--workspace"];
|
||||
let rust_prebuild = rust_build_image
|
||||
|
Loading…
Reference in New Issue
Block a user