From 1c550152ff14e2449114428efbf2bd38737362c7 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Sat, 14 Sep 2024 19:02:35 +0000 Subject: [PATCH] [buildx] fix buildx plugin installation --- Cargo.lock | 2 +- buildx/dagger.json | 2 +- buildx/plugin/Cargo.toml | 2 +- buildx/plugin/src/lib.rs | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 153cdf7..020bd00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ dependencies = [ [[package]] name = "buildx" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "extism-pdk", diff --git a/buildx/dagger.json b/buildx/dagger.json index 00f51d5..7273bf0 100644 --- a/buildx/dagger.json +++ b/buildx/dagger.json @@ -1,7 +1,7 @@ { "name": "buildx", "sdk": "github.com/fluentci-io/daggerverse/deno-sdk@main", - "version": "v0.1.2", + "version": "v0.1.3", "description": "", "author": "Tsiry Sandratraina", "license": "MIT" diff --git a/buildx/plugin/Cargo.toml b/buildx/plugin/Cargo.toml index 02b7685..7236cc8 100644 --- a/buildx/plugin/Cargo.toml +++ b/buildx/plugin/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "buildx" -version = "0.1.2" +version = "0.1.3" [lib] crate-type = ["cdylib"] diff --git a/buildx/plugin/src/lib.rs b/buildx/plugin/src/lib.rs index 9a8fa40..2d487bf 100644 --- a/buildx/plugin/src/lib.rs +++ b/buildx/plugin/src/lib.rs @@ -29,14 +29,14 @@ pub fn build(args: String) -> FnResult { .with_exec(vec!["pkgx", "install", "docker", "wget"])? .with_exec(vec![&format!( r#" - if [ ! -f $HOME/.docker/cli-plugins/{} ]; then + if [ ! -f $HOME/.docker/cli-plugins/docker-buildx ]; then wget {}; chmod +x {}; mkdir -p $HOME/.docker/cli-plugins; - mv {} $HOME/.docker/cli-plugins; + mv {} $HOME/.docker/cli-plugins/docker-buildx; fi "#, - buildx_plugin, buildx_download_url, buildx_plugin, buildx_plugin + buildx_download_url, buildx_plugin, buildx_plugin )])? .with_exec(vec!["docker buildx rm builder || true"])? .with_exec(vec![ @@ -78,14 +78,14 @@ pub fn build_cloud(args: String) -> FnResult { .with_exec(vec!["pkgx", "install", "docker", "wget"])? .with_exec(vec![&format!( r#" - if [ ! -f $HOME/.docker/cli-plugins/{} ]; then + if [ ! -f $HOME/.docker/cli-plugins/docker-buildx ]; then wget {}; chmod +x {}; mkdir -p $HOME/.docker/cli-plugins; - mv {} $HOME/.docker/cli-plugins; + mv {} $HOME/.docker/cli-plugins/docker-buildx; fi "#, - buildx_plugin, buildx_download_url, buildx_plugin, buildx_plugin + buildx_download_url, buildx_plugin, buildx_plugin )])? .with_exec(vec![&format!( "docker buildx create --driver cloud {} || true",