def tag_state

near-v-framework@0.4.0.0 · domain/architecture/system/effects.bend:221

import near-v-framework@0.4.0.0/domain/architecture/system/effects.bend as Effects
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as X
import near-v-framework@0.4.0.0/domain/architecture/system/release/type.bend as Rl
import near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend as P

221def tag_state(+home: String, +root: String, g: Rl.Plugin) -> IO(P.Tag):
222  match g:
223    case Rl.Plugin{+n, +v, +e, _, Rl.Repository{+r, _}}:
224      do IO<P.Tag>:
225        built : String <- build_plugin(root, home ++ "/.bend/bin/bend", n, e)
226        +repo : Bool <- X.succeeds("gh", ["repo", "view", r, "--json", "name"])
227        tags : String <- X.run("git", ["ls-remote", "--tags", "https://github.com/" ++ r, "refs/tags/" ++ tag_of(n, v)])
228        +tagged : Bool = repo && Bool.not(String.is_empty(String.trim(tags)))
229        differs : Bool <- tag_differs(tagged, root, n, v, r)
230        return P.Tag{repo, tagged, built, differs}

Uses (19)

Used by (1)