Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
fix: always install ruby with flox

fix: always install ruby with flox

fix: always install ruby with flox

fix: always install ruby with flox
  • Loading branch information
tsirysndr committed Jul 17, 2024
1 parent 4326c18 commit d163a0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fluentci run --wasm kamal help
| redeploy | Deploy app to servers without bootstrapping servers, starting Traefik, pruning, and registry login |
| registry | Login and -out of the image registry |
| remove | Remove Traefik, app, accessories, and registry session from servers |
| rolback | Rollback app to VERSION |
| rollback | Rollback app to VERSION |
| server | Bootstrap servers with curl and Docker |
| setup | Setup all accessories, push the env, and deploy app to servers |
| traefik | Manage Traefik load balancer |
Expand Down
17 changes: 9 additions & 8 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ pub fn setup() -> Result<(), Error> {
let home = dag().get_env("HOME")?;
let path = dag().get_env("PATH")?;

dag().set_envs(vec![(
"PATH".into(),
format!("{}/.local/bin:{}", home, path),
)])?;

setup_flox()?;
dag()
.pipeline("setup kamal")?
.flox()?
.with_exec(vec!["flox install ruby"])?
.with_exec(vec!["gem install kamal"])?
.with_exec(vec!["[ -d $HOME/.local/bin ] || mkdir -p $HOME/.local/bin"])?
.with_exec(vec![
"ln -s `gem environment gemhome`/bin/kamal $HOME/.local/bin/kamal || true",
])?
.with_exec(vec!["ln -s `flox activate -- gem environment gemhome`/bin/kamal $HOME/.local/bin/kamal || true"])?
.with_exec(vec!["PATH=$HOME/.local/bin:$PATH", "type", "kamal"])?
.with_exec(vec!["type", "ruby"])?
.stdout()?;

dag().set_envs(vec![(
"PATH".into(),
format!("{}/.local/bin:{}", home, path),
)])?;

Ok(())
}

0 comments on commit d163a0e

Please sign in to comment.