def release_plugin

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

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

242# A release: the build into plugins/<name>, the listing updated, committed, tagged and pushed.
243def release_plugin(+root: String, +n: String, +v: String, +r: String, create: Bool) -> IO(Bool):
244  do IO<Bool>:
245    +repo : String = plugin_dir(root, n) ++ "/repo"
246    _ : Bool <- Bool.pick(IO(Bool), create, X.succeeds("gh", ["repo", "create", r, "--public", "--description", "Claude Code plugins, built and released by V."]), IO.pure(Bool, True{}))
247    _ : Bool <- X.succeeds("rm", ["-rf", repo])
248    _ : Bool <- X.succeeds("git", ["clone", "-q", "https://github.com/" ++ r, repo])
249    _ : Bool <- X.succeeds("mkdir", ["-p", repo ++ "/plugins/" ++ n, repo ++ "/.claude-plugin"])
250    _ : Bool <- X.succeeds("rsync", ["-a", "--delete", plugin_dir(root, n) ++ "/build/", repo ++ "/plugins/" ++ n ++ "/"])
251    now : String <- X.read(repo ++ "/.claude-plugin/marketplace.json")
252    X.write(repo ++ "/.claude-plugin/marketplace.json", marketplace(now, n, v, r))
253    _ : Bool <- X.succeeds("git", ["-C", repo, "add", "-A"])
254    _ : Bool <- X.succeeds("git", ["-C", repo, "commit", "-q", "-m", n ++ " " ++ v])
255    _ : Bool <- X.succeeds("git", ["-C", repo, "tag", tag_of(n, v)])
256    X.succeeds("git", ["-C", repo, "push", "-q", "origin", "HEAD:main", tag_of(n, v)])

Uses (15)

Used by (1)