Skip to content

Commit

Permalink
[sdk/purescript] update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Aug 19, 2024
1 parent 4ff5f5f commit a725583
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Binary file modified sdk/purescript/demo/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion sdk/purescript/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"typescript": "^5.0.0"
},
"dependencies": {
"@fluentci/sdk": "npm:@jsr/fluentci__sdk"
"@fluentci/sdk": "npm:@jsr/fluentci__sdk@0.4.3"
}
}
2 changes: 1 addition & 1 deletion sdk/purescript/demo/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ in upstream
, repo =
"https://github.com/fluentci-io/purescript-fluentci.git"
, version =
"d0d904915b1eade1f1e72ab541708ad4b43ccd5e"
"c0e9c1f6a0f769e3deec66eaf2e5a0c078ef8bb8"
}

19 changes: 15 additions & 4 deletions sdk/purescript/demo/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Effect.Class.Console as Console
import FluentCI.Class (asService, id, mise, nix, pkgx, stdout, withExec, withSecretVariable, withService, withWorkdir)
import FluentCI.Class (asService, id, mise, nix, pkgx, stdout, withExec, withSecretVariable, withService, withWorkdir, hermit)
import FluentCI.Client (cache, dag, git, pipeline, setSecret)
import FluentCI.Directory (Directory, entries)
import FluentCI.Git (branch, tree)
import FluentCI.Mise (Mise)
import FluentCI.Hermit (Hermit)
import FluentCI.Mise (Mise, trust)
import FluentCI.Pipeline (Pipeline)
import FluentCI.Pkgx (withPackages)
import FluentCI.Secret (Secret, plaintext)
Expand Down Expand Up @@ -41,6 +42,9 @@ main = launchAff_ do
gitEntries <- liftEffect $ gitEntriesDemo
entries gitEntries >>= Console.debugShow

h <- liftEffect $ hermitDemo
stdout h >>= Console.log

ping :: Effect Service
ping = do
p <- pipeline dag "demo"
Expand Down Expand Up @@ -69,8 +73,15 @@ miseDemo = do
p <- pipeline dag "mise-demo"
m <- mise p
m1 <- withWorkdir m "./mise-demo"
m2 <- withExec m1 ["mise", "--version"]
withExec m2 ["which", "bun"]
m2 <- trust m1
m3 <- withExec m2 ["mise", "--version"]
withExec m3 ["which", "bun"]

hermitDemo :: Effect Hermit
hermitDemo = do
h <- hermit dag
h1 <- withWorkdir h "./hermit-demo"
withExec h1 ["which", "jq"]

pingDemo :: Service -> Service -> Effect Pipeline
pingDemo svc1 svc2 = do
Expand Down

0 comments on commit a725583

Please sign in to comment.