def set.go

ezx@1.11.0.0 · src/lock/up.bend:842

import ezx@1.11.0.0/src/lock/up.bend as Up
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

842# the pin with a commit and a NAR hash written in. An empty tag leaves the one
843# the ledger already had. The vendor bit is off: a tool is not committed under
844# `.ez/lib`.
845def set.go(
846  +name: String,
847  +entry: String,
848  +bin: String,
849  source: M.Source,
850  +rev: String,
851  +tag: String,
852  +nar: String
853) -> M.Tool:
854  match source:
855    case M.Hub{named}:
856      M.Tool{name, entry, bin, M.Hub{named}}
857    case M.Git{url, _rev, old, root, _nar, _vend}:
858      M.Tool{name, entry, bin, M.Git{url, rev,
859        Bool.pick(String, String.is_empty(tag), old, tag), M.root.or(root),
860        nar, False{}}}
861    case M.Member{path, named}:
862      M.Tool{name, entry, bin, M.Member{path, named}}

Uses (7)

Used by (1)