Skip to content

Commit

Permalink
[buildx] fix buildx plugin installation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Sep 14, 2024
1 parent 3d49ef4 commit 1c55015
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion buildx/dagger.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion buildx/plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "buildx"
version = "0.1.2"
version = "0.1.3"

[lib]
crate-type = ["cdylib"]
Expand Down
12 changes: 6 additions & 6 deletions buildx/plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ pub fn build(args: String) -> FnResult<String> {
.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![
Expand Down Expand Up @@ -78,14 +78,14 @@ pub fn build_cloud(args: String) -> FnResult<String> {
.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",
Expand Down

0 comments on commit 1c55015

Please sign in to comment.