mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
Publish pipeline: goreleaser + Maven Central + npm (#1)
* feat(cli): add Version var and version subcommand * build(gradle): introduce uatu.version property for lockstep releases * build(sdk-android): swap GitHub Packages for vanniktech Maven Central plugin * build(spec-api): make package publish-ready for npm * ci(release): add goreleaser config for cross-platform uatu CLI builds * ci: add ci and release GitHub Actions workflows * ci: restrict ci.yml to PR + workflow_dispatch (no direct push to master) * docs(release): add local release targets, env example, and install docs * build(sdk-android): make signAllPublications conditional on signing key * ci(release): stage sidecar JAR at embed path before go build * chore(spec-api): regenerate package-lock for updated package.json * ci: install protoc-gen-go plugins before buf generate * ci: bump Node to 22 (required for --experimental-strip-types)
This commit is contained in:
17 files changed
+556
-37
No files matched your search
@@ -95,6 +95,22 @@ func TestRun_HelpPrintsUsage(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRun_VersionPrintsVersion(t *testing.T) {
|
||||
prev := Version
|
||||
Version = "1.2.3-test"
|
||||
defer func() { Version = prev }()
|
||||
|
||||
for _, arg := range []string{"version", "--version", "-v"} {
|
||||
var stdout bytes.Buffer
|
||||
if err := run([]string{"uatu", arg}, &stdout, io.Discard); err != nil {
|
||||
t.Fatalf("%s: %v", arg, err)
|
||||
}
|
||||
if strings.TrimSpace(stdout.String()) != "1.2.3-test" {
|
||||
t.Errorf("%s: got %q, want 1.2.3-test", arg, stdout.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRun_UnknownCommand(t *testing.T) {
|
||||
err := run([]string{"uatu", "wat"}, io.Discard, io.Discard)
|
||||
if err == nil || !strings.Contains(err.Error(), "unknown command") {
|
||||
|
||||
Reference in new issue
Block a user