add updater

This commit is contained in:
2023-04-03 00:18:32 +02:00
parent 79ef3ecc43
commit 2f687b633a
4 changed files with 35 additions and 20 deletions

View File

@@ -12,11 +12,11 @@ async fn main() -> eyre::Result<()> {
let src = client.host().directory_opts(
".",
HostDirectoryOptsBuilder::default()
.exclude(vec!["target/", ".git/"])
.exclude(vec!["target/", ".git/", "ci/"])
.build()?,
);
let variants = vec!["linux/amd64", "linux/arm64"];
let variants = vec![/*"linux/amd64", */ "linux/arm64"];
let platform_variants = Arc::new(Mutex::new(Vec::new()));
tokio_scoped::scope(|s| {
@@ -35,6 +35,31 @@ async fn main() -> eyre::Result<()> {
)
.from("rustlang/rust:nightly")
.with_workdir("/app")
//.with_exec(vec!["apt-get", "update"])
//.with_exec(vec![
// "apt-get",
// "install",
// "-y",
// "build-essential",
// "cmake",
// "curl",
// "file",
// "git",
// "sudo",
// "xutils-dev",
// "unzip",
// "ca-certificates",
// "python3",
// "python3-pip",
// "autoconf",
// "autoconf-archive",
// "automake",
// "flex",
// "bison",
// "llvm-dev",
// "libclang-dev",
// "clang",
//])
.with_directory(".", src.id().await.unwrap())
.with_exec(vec!["cargo", "build", "--release"]);
@@ -46,6 +71,8 @@ async fn main() -> eyre::Result<()> {
.unwrap(),
)
.from("debian:bullseye")
.with_exec(vec!["apt-get", "update"])
.with_exec(vec!["apt-get", "install", "-y", "openssl", "git"])
.with_file(
"/usr/bin/update-deployment",
rust_dep_image
@@ -53,7 +80,8 @@ async fn main() -> eyre::Result<()> {
.id()
.await
.unwrap(),
);
)
.with_exec(vec!["update-deployment", "--help"]);
let mut platform_variants = platform_variants.lock().await;
platform_variants.push(dep_image.id().await.unwrap())