← back to Cli Printing Press
fix(cli): use /v2 module path so go install reports correct version (#298)
1ab789ea583abcf1a8fe5e0d8719a024cab5308c · 2026-04-26 00:12:16 -0700 · Trevin Chow
* fix(cli): migrate module path to /v2 so go install reports correct version
Tags are at v2.x but go.mod declared the module without a `/v2` suffix,
violating Go's Semantic Import Versioning rule. As a result,
`go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest`
silently resolved to a v1-derived pseudo-version (last v1 tag was v1.3.2),
and binaries reported `1.3.3-0.<timestamp>-<hash>` instead of `2.3.6`.
Three fixes that together prevent recurrence:
1. Module path is now `github.com/mvanhorn/cli-printing-press/v2`. All 104
internal imports, the goreleaser ldflags target, and the README install
command are updated to match.
2. The version-from-build-info filter in `internal/version/version.go` now
detects every Go pseudo-version form via the `\d{14}-[0-9a-f]{12}$`
suffix shared by all three forms, not just the narrow `0.0.0-` prefix.
Local `go install` from a checkout always produces a pseudo-version, so
this ensures the binary falls back to the hardcoded Version constant
rather than reporting build-info garbage.
3. New `TestModulePathMatchesMajorVersion` in `internal/cli/release_test.go`
parses the major from `version.Version` and asserts `go.mod`'s path has
the matching `/vN` suffix. The next time release-please proposes v3.0.0,
this test fails until go.mod is also bumped — making the whack-a-mole
self-healing instead of latent.
* fix(skills): point install commands at /v2 module path
The cli commit moved the module to `github.com/mvanhorn/cli-printing-press/v2`.
Skill setup contracts and version-mismatch warnings were still telling
users to `go install` the unsuffixed path, which silently resolves to the
last v1 tag and produces a stale binary.
Updates the four affected SKILL.md files (catalog, publish, score, root
printing-press) so first-time and update flows install the v2-resolved
binary.
Files touched
M .goreleaser.yamlM README.mdM cmd/manifest-gen/main.goM cmd/printing-press-mcp/main.goM cmd/printing-press/main.goM go.modM internal/authdoctor/classify.goM internal/authdoctor/classify_test.goM internal/authdoctor/scan.goM internal/authdoctor/scan_test.goM internal/browsersniff/analysis.goM internal/browsersniff/analysis_test.goM internal/browsersniff/reachability.goM internal/browsersniff/schema.goM internal/browsersniff/schema_test.goM internal/browsersniff/specgen.goM internal/browsersniff/specgen_test.goM internal/catalog/catalog_test.goM internal/cli/auth_doctor_cmd.goM internal/cli/browser_sniff.goM internal/cli/browser_sniff_test.goM internal/cli/catalog.goM internal/cli/catalog_test.goM internal/cli/crowd_sniff.goM internal/cli/crowd_sniff_test.goM internal/cli/dogfood.goM internal/cli/dogfood_test.goM internal/cli/emboss.goM internal/cli/emboss_test.goM internal/cli/exitcodes_pipeline_test.goM internal/cli/generate_test.goM internal/cli/library.goM internal/cli/library_test.goM internal/cli/lock.goM internal/cli/lock_test.goM internal/cli/patch_cmd.goM internal/cli/polish.goM internal/cli/publish.goM internal/cli/publish_test.goM internal/cli/release_test.goM internal/cli/root.goM internal/cli/scorecard.goM internal/cli/verify.goM internal/cli/vision.goM internal/cli/vision_test.goM internal/cli/workflow_verify.goM internal/crowdsniff/specgen.goM internal/crowdsniff/specgen_test.goM internal/docspec/docspec.goM internal/generator/async_detect.goM internal/generator/async_detect_test.goM internal/generator/auth_optional_test.goM internal/generator/body_collision_test.goM internal/generator/entity_mapper.goM internal/generator/enum_validation_test.goM internal/generator/first_command_example.goM internal/generator/first_command_example_test.goM internal/generator/flag_collision.goM internal/generator/flag_collision_test.goM internal/generator/generator.goM internal/generator/generator_test.goM internal/generator/json_string_validation_test.goM internal/generator/plan_generate.goM internal/generator/plan_generate_test.goM internal/generator/promoted_presence_check_test.goM internal/generator/readme_test.goM internal/generator/schema_builder.goM internal/generator/schema_builder_test.goM internal/generator/session_handshake_test.goM internal/generator/skill_test.goM internal/generator/types_keyword_test.goM internal/generator/validate.goM internal/generator/vision_templates.goM internal/graphql/parser.goM internal/graphql/parser_test.goM internal/llmpolish/polish.goM internal/llmpolish/vision.goM internal/llmpolish/vision_test.goM internal/megamcp/metatools.goM internal/megamcp/types.goM internal/openapi/detect.goM internal/openapi/parser.goM internal/openapi/parser_test.goM internal/patch/dropins.goM internal/pipeline/climanifest.goM internal/pipeline/climanifest_test.goM internal/pipeline/contracts_test.goM internal/pipeline/dogfood.goM internal/pipeline/fullrun.goM internal/pipeline/lock.goM internal/pipeline/merge.goM internal/pipeline/merge_test.goM internal/pipeline/paths.goM internal/pipeline/publish.goM internal/pipeline/renamecli.goM internal/pipeline/renamecli_test.goM internal/pipeline/research.goM internal/pipeline/runtime.goM internal/pipeline/runtime_test.goM internal/pipeline/scorecard.goM internal/pipeline/spec_detect.goM internal/pipeline/state.goM internal/pipeline/toolsmanifest.goM internal/pipeline/toolsmanifest_test.goM internal/pipeline/verify.goM internal/profiler/profiler.goM internal/profiler/profiler_test.goM internal/version/version.goM internal/version/version_test.goM skills/printing-press-catalog/SKILL.mdM skills/printing-press-publish/SKILL.mdM skills/printing-press-score/SKILL.mdM skills/printing-press/SKILL.md
Diff
commit 1ab789ea583abcf1a8fe5e0d8719a024cab5308c
Author: Trevin Chow <trevin@trevinchow.com>
Date: Sun Apr 26 00:12:16 2026 -0700
fix(cli): use /v2 module path so go install reports correct version (#298)
* fix(cli): migrate module path to /v2 so go install reports correct version
Tags are at v2.x but go.mod declared the module without a `/v2` suffix,
violating Go's Semantic Import Versioning rule. As a result,
`go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest`
silently resolved to a v1-derived pseudo-version (last v1 tag was v1.3.2),
and binaries reported `1.3.3-0.<timestamp>-<hash>` instead of `2.3.6`.
Three fixes that together prevent recurrence:
1. Module path is now `github.com/mvanhorn/cli-printing-press/v2`. All 104
internal imports, the goreleaser ldflags target, and the README install
command are updated to match.
2. The version-from-build-info filter in `internal/version/version.go` now
detects every Go pseudo-version form via the `\d{14}-[0-9a-f]{12}$`
suffix shared by all three forms, not just the narrow `0.0.0-` prefix.
Local `go install` from a checkout always produces a pseudo-version, so
this ensures the binary falls back to the hardcoded Version constant
rather than reporting build-info garbage.
3. New `TestModulePathMatchesMajorVersion` in `internal/cli/release_test.go`
parses the major from `version.Version` and asserts `go.mod`'s path has
the matching `/vN` suffix. The next time release-please proposes v3.0.0,
this test fails until go.mod is also bumped — making the whack-a-mole
self-healing instead of latent.
* fix(skills): point install commands at /v2 module path
The cli commit moved the module to `github.com/mvanhorn/cli-printing-press/v2`.
Skill setup contracts and version-mismatch warnings were still telling
users to `go install` the unsuffixed path, which silently resolves to the
last v1 tag and produces a stale binary.
Updates the four affected SKILL.md files (catalog, publish, score, root
printing-press) so first-time and update flows install the v2-resolved
binary.
---
.goreleaser.yaml | 4 +-
README.md | 4 +-
cmd/manifest-gen/main.go | 8 ++--
cmd/printing-press-mcp/main.go | 4 +-
cmd/printing-press/main.go | 2 +-
go.mod | 4 +-
internal/authdoctor/classify.go | 2 +-
internal/authdoctor/classify_test.go | 2 +-
internal/authdoctor/scan.go | 2 +-
internal/authdoctor/scan_test.go | 2 +-
internal/browsersniff/analysis.go | 2 +-
internal/browsersniff/analysis_test.go | 2 +-
internal/browsersniff/reachability.go | 2 +-
internal/browsersniff/schema.go | 2 +-
internal/browsersniff/schema_test.go | 2 +-
internal/browsersniff/specgen.go | 2 +-
internal/browsersniff/specgen_test.go | 2 +-
internal/catalog/catalog_test.go | 2 +-
internal/cli/auth_doctor_cmd.go | 2 +-
internal/cli/browser_sniff.go | 4 +-
internal/cli/browser_sniff_test.go | 4 +-
internal/cli/catalog.go | 4 +-
internal/cli/catalog_test.go | 2 +-
internal/cli/crowd_sniff.go | 4 +-
internal/cli/crowd_sniff_test.go | 2 +-
internal/cli/dogfood.go | 2 +-
internal/cli/dogfood_test.go | 2 +-
internal/cli/emboss.go | 4 +-
internal/cli/emboss_test.go | 2 +-
internal/cli/exitcodes_pipeline_test.go | 4 +-
internal/cli/generate_test.go | 4 +-
internal/cli/library.go | 4 +-
internal/cli/library_test.go | 2 +-
internal/cli/lock.go | 2 +-
internal/cli/lock_test.go | 2 +-
internal/cli/patch_cmd.go | 2 +-
internal/cli/polish.go | 2 +-
internal/cli/publish.go | 6 +--
internal/cli/publish_test.go | 4 +-
internal/cli/release_test.go | 53 +++++++++++++++++++++-
internal/cli/root.go | 26 +++++------
internal/cli/scorecard.go | 2 +-
internal/cli/verify.go | 4 +-
internal/cli/vision.go | 4 +-
internal/cli/vision_test.go | 2 +-
internal/cli/workflow_verify.go | 2 +-
internal/crowdsniff/specgen.go | 2 +-
internal/crowdsniff/specgen_test.go | 2 +-
internal/docspec/docspec.go | 4 +-
internal/generator/async_detect.go | 2 +-
internal/generator/async_detect_test.go | 2 +-
internal/generator/auth_optional_test.go | 2 +-
internal/generator/body_collision_test.go | 2 +-
internal/generator/entity_mapper.go | 4 +-
internal/generator/enum_validation_test.go | 2 +-
internal/generator/first_command_example.go | 2 +-
internal/generator/first_command_example_test.go | 2 +-
internal/generator/flag_collision.go | 2 +-
internal/generator/flag_collision_test.go | 2 +-
internal/generator/generator.go | 8 ++--
internal/generator/generator_test.go | 10 ++--
internal/generator/json_string_validation_test.go | 2 +-
internal/generator/plan_generate.go | 2 +-
internal/generator/plan_generate_test.go | 2 +-
internal/generator/promoted_presence_check_test.go | 2 +-
internal/generator/readme_test.go | 2 +-
internal/generator/schema_builder.go | 2 +-
internal/generator/schema_builder_test.go | 2 +-
internal/generator/session_handshake_test.go | 2 +-
internal/generator/skill_test.go | 2 +-
internal/generator/types_keyword_test.go | 2 +-
internal/generator/validate.go | 4 +-
internal/generator/vision_templates.go | 2 +-
internal/graphql/parser.go | 2 +-
internal/graphql/parser_test.go | 2 +-
internal/llmpolish/polish.go | 2 +-
internal/llmpolish/vision.go | 6 +--
internal/llmpolish/vision_test.go | 4 +-
internal/megamcp/metatools.go | 6 +--
internal/megamcp/types.go | 2 +-
internal/openapi/detect.go | 2 +-
internal/openapi/parser.go | 4 +-
internal/openapi/parser_test.go | 6 +--
internal/patch/dropins.go | 2 +-
internal/pipeline/climanifest.go | 12 ++---
internal/pipeline/climanifest_test.go | 4 +-
internal/pipeline/contracts_test.go | 8 ++--
internal/pipeline/dogfood.go | 6 +--
internal/pipeline/fullrun.go | 4 +-
internal/pipeline/lock.go | 2 +-
internal/pipeline/merge.go | 2 +-
internal/pipeline/merge_test.go | 2 +-
internal/pipeline/paths.go | 2 +-
internal/pipeline/publish.go | 14 +++---
internal/pipeline/renamecli.go | 2 +-
internal/pipeline/renamecli_test.go | 2 +-
internal/pipeline/research.go | 6 +--
internal/pipeline/runtime.go | 6 +--
internal/pipeline/runtime_test.go | 2 +-
internal/pipeline/scorecard.go | 2 +-
internal/pipeline/spec_detect.go | 2 +-
internal/pipeline/state.go | 2 +-
internal/pipeline/toolsmanifest.go | 2 +-
internal/pipeline/toolsmanifest_test.go | 2 +-
internal/pipeline/verify.go | 2 +-
internal/profiler/profiler.go | 4 +-
internal/profiler/profiler_test.go | 2 +-
internal/version/version.go | 30 ++++++++----
internal/version/version_test.go | 25 ++++++++++
skills/printing-press-catalog/SKILL.md | 6 +--
skills/printing-press-publish/SKILL.md | 4 +-
skills/printing-press-score/SKILL.md | 8 ++--
skills/printing-press/SKILL.md | 6 +--
113 files changed, 289 insertions(+), 201 deletions(-)
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index c4a49866..2f1084cf 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -16,7 +16,7 @@ builds:
flags:
- -trimpath
ldflags:
- - -s -w -X github.com/mvanhorn/cli-printing-press/internal/version.Version={{.Version}}
+ - -s -w -X github.com/mvanhorn/cli-printing-press/v2/internal/version.Version={{.Version}}
mod_timestamp: "{{ .CommitTimestamp }}"
- id: printing-press-mcp
@@ -34,7 +34,7 @@ builds:
flags:
- -trimpath
ldflags:
- - -s -w -X github.com/mvanhorn/cli-printing-press/internal/version.Version={{.Version}}
+ - -s -w -X github.com/mvanhorn/cli-printing-press/v2/internal/version.Version={{.Version}}
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
diff --git a/README.md b/README.md
index e234857f..878bf84c 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ One command. Lean loop. Produces a Go CLI + MCP server that absorbs every featur
Install the binary, then start a Claude Code session and run each command one after another:
```bash
-go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest
+go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest
```
```
@@ -343,7 +343,7 @@ Each published CLI includes research manuscripts, verification proofs, and a `.p
Install the binary (requires Go 1.22+):
```bash
-go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest
+go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest
```
Then install the Claude Code plugin:
diff --git a/cmd/manifest-gen/main.go b/cmd/manifest-gen/main.go
index 30b111c2..c57656d3 100644
--- a/cmd/manifest-gen/main.go
+++ b/cmd/manifest-gen/main.go
@@ -23,10 +23,10 @@ import (
"path/filepath"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/graphql"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/graphql"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
func main() {
diff --git a/cmd/printing-press-mcp/main.go b/cmd/printing-press-mcp/main.go
index 1d1f70a6..3474fc96 100644
--- a/cmd/printing-press-mcp/main.go
+++ b/cmd/printing-press-mcp/main.go
@@ -8,8 +8,8 @@ import (
"syscall"
"github.com/mark3labs/mcp-go/server"
- "github.com/mvanhorn/cli-printing-press/internal/megamcp"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/megamcp"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
)
const (
diff --git a/cmd/printing-press/main.go b/cmd/printing-press/main.go
index b4737c14..58eae143 100644
--- a/cmd/printing-press/main.go
+++ b/cmd/printing-press/main.go
@@ -5,7 +5,7 @@ import (
"fmt"
"os"
- "github.com/mvanhorn/cli-printing-press/internal/cli"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/cli"
)
func main() {
diff --git a/go.mod b/go.mod
index b34a9ff1..ed932adb 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/mvanhorn/cli-printing-press
+module github.com/mvanhorn/cli-printing-press/v2
go 1.26.1
@@ -8,6 +8,7 @@ require (
github.com/mark3labs/mcp-go v0.47.0
github.com/spf13/cobra v1.10.2
github.com/stretchr/testify v1.11.1
+ golang.org/x/mod v0.33.0
golang.org/x/sync v0.20.0
golang.org/x/text v0.35.0
gopkg.in/yaml.v3 v3.0.1
@@ -31,6 +32,5 @@ require (
github.com/spf13/pflag v1.0.9 // indirect
github.com/woodsbury/decimal128 v1.3.0 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
- golang.org/x/mod v0.33.0 // indirect
golang.org/x/tools v0.42.0 // indirect
)
diff --git a/internal/authdoctor/classify.go b/internal/authdoctor/classify.go
index f00c41e7..adbef6d6 100644
--- a/internal/authdoctor/classify.go
+++ b/internal/authdoctor/classify.go
@@ -3,7 +3,7 @@ package authdoctor
import (
"fmt"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
// minLengthByType gives the minimum expected length of a well-formed
diff --git a/internal/authdoctor/classify_test.go b/internal/authdoctor/classify_test.go
index f0d11048..26ad53a7 100644
--- a/internal/authdoctor/classify_test.go
+++ b/internal/authdoctor/classify_test.go
@@ -3,7 +3,7 @@ package authdoctor
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
func envFrom(m map[string]string) getEnv {
diff --git a/internal/authdoctor/scan.go b/internal/authdoctor/scan.go
index 21c2f657..2762f9f0 100644
--- a/internal/authdoctor/scan.go
+++ b/internal/authdoctor/scan.go
@@ -15,7 +15,7 @@ import (
"path/filepath"
"sort"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
// Scan inspects every installed printed CLI under the published library
diff --git a/internal/authdoctor/scan_test.go b/internal/authdoctor/scan_test.go
index 9a9deee9..39ed9466 100644
--- a/internal/authdoctor/scan_test.go
+++ b/internal/authdoctor/scan_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
func writeManifest(t *testing.T, dir string, m pipeline.ToolsManifest) {
diff --git a/internal/browsersniff/analysis.go b/internal/browsersniff/analysis.go
index 9e6c0e7e..93da029b 100644
--- a/internal/browsersniff/analysis.go
+++ b/internal/browsersniff/analysis.go
@@ -10,7 +10,7 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
const trafficAnalysisVersion = "1"
diff --git a/internal/browsersniff/analysis_test.go b/internal/browsersniff/analysis_test.go
index a9ee70fe..aa10fbcb 100644
--- a/internal/browsersniff/analysis_test.go
+++ b/internal/browsersniff/analysis_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/browsersniff/reachability.go b/internal/browsersniff/reachability.go
index c47b7752..f791ad1f 100644
--- a/internal/browsersniff/reachability.go
+++ b/internal/browsersniff/reachability.go
@@ -5,7 +5,7 @@ import (
"sort"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
func ApplyReachabilityDefaults(apiSpec *spec.APISpec, analysis *TrafficAnalysis) {
diff --git a/internal/browsersniff/schema.go b/internal/browsersniff/schema.go
index df00dda1..25d5f4d2 100644
--- a/internal/browsersniff/schema.go
+++ b/internal/browsersniff/schema.go
@@ -10,7 +10,7 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
const maxSchemaDepth = 3
diff --git a/internal/browsersniff/schema_test.go b/internal/browsersniff/schema_test.go
index ce869f6d..bbd80de2 100644
--- a/internal/browsersniff/schema_test.go
+++ b/internal/browsersniff/schema_test.go
@@ -3,7 +3,7 @@ package browsersniff
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/browsersniff/specgen.go b/internal/browsersniff/specgen.go
index 9806492c..d99e8183 100644
--- a/internal/browsersniff/specgen.go
+++ b/internal/browsersniff/specgen.go
@@ -10,7 +10,7 @@ import (
"strings"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"gopkg.in/yaml.v3"
)
diff --git a/internal/browsersniff/specgen_test.go b/internal/browsersniff/specgen_test.go
index 7dcd1989..0ff29be7 100644
--- a/internal/browsersniff/specgen_test.go
+++ b/internal/browsersniff/specgen_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/catalog/catalog_test.go b/internal/catalog/catalog_test.go
index cfde3b4d..9b45afd7 100644
--- a/internal/catalog/catalog_test.go
+++ b/internal/catalog/catalog_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"testing/fstest"
- catalogfs "github.com/mvanhorn/cli-printing-press/catalog"
+ catalogfs "github.com/mvanhorn/cli-printing-press/v2/catalog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/auth_doctor_cmd.go b/internal/cli/auth_doctor_cmd.go
index 63c714bb..ed8ac459 100644
--- a/internal/cli/auth_doctor_cmd.go
+++ b/internal/cli/auth_doctor_cmd.go
@@ -3,7 +3,7 @@ package cli
import (
"fmt"
- "github.com/mvanhorn/cli-printing-press/internal/authdoctor"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/authdoctor"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/browser_sniff.go b/internal/cli/browser_sniff.go
index 71c922fb..638f7373 100644
--- a/internal/cli/browser_sniff.go
+++ b/internal/cli/browser_sniff.go
@@ -8,8 +8,8 @@ import (
"path/filepath"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/browser_sniff_test.go b/internal/cli/browser_sniff_test.go
index b788bd69..4fce584c 100644
--- a/internal/cli/browser_sniff_test.go
+++ b/internal/cli/browser_sniff_test.go
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/internal/cli/catalog.go b/internal/cli/catalog.go
index aec3019e..28dc7055 100644
--- a/internal/cli/catalog.go
+++ b/internal/cli/catalog.go
@@ -7,8 +7,8 @@ import (
"sort"
"strings"
- catalogfs "github.com/mvanhorn/cli-printing-press/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/catalog"
+ catalogfs "github.com/mvanhorn/cli-printing-press/v2/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/catalog_test.go b/internal/cli/catalog_test.go
index 1507606e..c5725a0a 100644
--- a/internal/cli/catalog_test.go
+++ b/internal/cli/catalog_test.go
@@ -6,7 +6,7 @@ import (
"os"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/crowd_sniff.go b/internal/cli/crowd_sniff.go
index 7da2b529..dd91d9fe 100644
--- a/internal/cli/crowd_sniff.go
+++ b/internal/cli/crowd_sniff.go
@@ -11,8 +11,8 @@ import (
"strings"
"sync"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/crowdsniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/crowdsniff"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)
diff --git a/internal/cli/crowd_sniff_test.go b/internal/cli/crowd_sniff_test.go
index 57131880..c1d917bc 100644
--- a/internal/cli/crowd_sniff_test.go
+++ b/internal/cli/crowd_sniff_test.go
@@ -9,7 +9,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/crowdsniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/crowdsniff"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/dogfood.go b/internal/cli/dogfood.go
index 1b3a769e..c00c55bf 100644
--- a/internal/cli/dogfood.go
+++ b/internal/cli/dogfood.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/dogfood_test.go b/internal/cli/dogfood_test.go
index 5ac6da4a..e1174e34 100644
--- a/internal/cli/dogfood_test.go
+++ b/internal/cli/dogfood_test.go
@@ -6,7 +6,7 @@ import (
"os"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/emboss.go b/internal/cli/emboss.go
index 351e42ec..a18e0497 100644
--- a/internal/cli/emboss.go
+++ b/internal/cli/emboss.go
@@ -8,8 +8,8 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/emboss_test.go b/internal/cli/emboss_test.go
index fdce4ae2..6f854a98 100644
--- a/internal/cli/emboss_test.go
+++ b/internal/cli/emboss_test.go
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/exitcodes_pipeline_test.go b/internal/cli/exitcodes_pipeline_test.go
index 1dd52f6c..5fd84d32 100644
--- a/internal/cli/exitcodes_pipeline_test.go
+++ b/internal/cli/exitcodes_pipeline_test.go
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/cli"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/cli"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
// TestPrintCmd_AlreadyExists_ExitCode verifies that the "already exists"
diff --git a/internal/cli/generate_test.go b/internal/cli/generate_test.go
index dbdb7da6..3c3f822f 100644
--- a/internal/cli/generate_test.go
+++ b/internal/cli/generate_test.go
@@ -8,8 +8,8 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/library.go b/internal/cli/library.go
index ffaa0880..1610f8be 100644
--- a/internal/cli/library.go
+++ b/internal/cli/library.go
@@ -9,8 +9,8 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/library_test.go b/internal/cli/library_test.go
index 1bf2979f..317d05b4 100644
--- a/internal/cli/library_test.go
+++ b/internal/cli/library_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/lock.go b/internal/cli/lock.go
index 9ae9d382..81119419 100644
--- a/internal/cli/lock.go
+++ b/internal/cli/lock.go
@@ -5,7 +5,7 @@ import (
"fmt"
"os"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/lock_test.go b/internal/cli/lock_test.go
index d42314ce..228103ef 100644
--- a/internal/cli/lock_test.go
+++ b/internal/cli/lock_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/patch_cmd.go b/internal/cli/patch_cmd.go
index 55dc48b5..896be040 100644
--- a/internal/cli/patch_cmd.go
+++ b/internal/cli/patch_cmd.go
@@ -5,7 +5,7 @@ import (
"fmt"
"io"
- "github.com/mvanhorn/cli-printing-press/internal/patch"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/patch"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/polish.go b/internal/cli/polish.go
index 2da9df2c..9e514476 100644
--- a/internal/cli/polish.go
+++ b/internal/cli/polish.go
@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/publish.go b/internal/cli/publish.go
index 2349ccfc..d70c3b88 100644
--- a/internal/cli/publish.go
+++ b/internal/cli/publish.go
@@ -11,9 +11,9 @@ import (
"strings"
"time"
- catalogpkg "github.com/mvanhorn/cli-printing-press/internal/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ catalogpkg "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/publish_test.go b/internal/cli/publish_test.go
index bb6a95fa..6f93b9f9 100644
--- a/internal/cli/publish_test.go
+++ b/internal/cli/publish_test.go
@@ -6,8 +6,8 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/release_test.go b/internal/cli/release_test.go
index 1b67dcd6..04e6222f 100644
--- a/internal/cli/release_test.go
+++ b/internal/cli/release_test.go
@@ -2,13 +2,16 @@ package cli
import (
"encoding/json"
+ "fmt"
"os"
+ "regexp"
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+ "golang.org/x/mod/modfile"
"gopkg.in/yaml.v3"
)
@@ -35,7 +38,7 @@ func TestGoreleaserLdflagsTargetMatchesVersionVar(t *testing.T) {
ldflags := strings.Join(config.Builds[0].Ldflags, " ")
assert.Contains(t, ldflags,
- "github.com/mvanhorn/cli-printing-press/internal/version.Version",
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version.Version",
"goreleaser ldflags must target internal/version.Version")
}
@@ -94,6 +97,52 @@ func TestMarketplaceJSONHasNoPluginVersion(t *testing.T) {
}
}
+func TestModulePathMatchesMajorVersion(t *testing.T) {
+ // Go's Semantic Import Versioning rule (https://go.dev/ref/mod#major-version-suffixes)
+ // requires that any module at v2 or higher embed `/vN` as a suffix on its
+ // module path AND in every internal import. If the module path drifts
+ // from the source-of-truth Version constant, `go install …@latest`
+ // silently resolves to a pseudo-version derived from the highest
+ // compatible tag, and the installed binary reports the wrong version.
+ //
+ // This test is the tripwire: when release-please proposes a major bump
+ // (e.g. v2 → v3), this test fails until go.mod is also updated to the
+ // new /vN and every internal import is rewritten.
+
+ data, err := os.ReadFile("../../go.mod")
+ require.NoError(t, err)
+
+ mf, err := modfile.Parse("go.mod", data, nil)
+ require.NoError(t, err)
+ require.NotNil(t, mf.Module, "go.mod must declare a module")
+
+ major := majorVersion(t, version.Version)
+ wantSuffix := ""
+ if major >= 2 {
+ wantSuffix = fmt.Sprintf("/v%d", major)
+ }
+
+ got := mf.Module.Mod.Path
+ if wantSuffix == "" {
+ assert.NotRegexp(t, regexp.MustCompile(`/v\d+$`), got,
+ "v0/v1 modules must not have a /vN suffix")
+ } else {
+ assert.True(t, strings.HasSuffix(got, wantSuffix),
+ "version.go is at v%d but go.mod path %q is missing %q suffix — see https://go.dev/ref/mod#major-version-suffixes",
+ major, got, wantSuffix)
+ }
+}
+
+func majorVersion(t *testing.T, v string) int {
+ t.Helper()
+ parts := strings.SplitN(v, ".", 2)
+ require.NotEmpty(t, parts[0], "Version must have a major component")
+ var major int
+ _, err := fmt.Sscanf(parts[0], "%d", &major)
+ require.NoError(t, err, "Version major %q must be an integer", parts[0])
+ return major
+}
+
func TestPRTitleWorkflowAllowsReleasePleaseScope(t *testing.T) {
// release-please uses the target branch as the conventional-commit scope
// for generated release PR titles, e.g. chore(main): release 2.2.0.
diff --git a/internal/cli/root.go b/internal/cli/root.go
index 7b410554..062d949a 100644
--- a/internal/cli/root.go
+++ b/internal/cli/root.go
@@ -14,19 +14,19 @@ import (
"strings"
"time"
- catalogfs "github.com/mvanhorn/cli-printing-press/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/docspec"
- "github.com/mvanhorn/cli-printing-press/internal/generator"
- "github.com/mvanhorn/cli-printing-press/internal/graphql"
- "github.com/mvanhorn/cli-printing-press/internal/llm"
- "github.com/mvanhorn/cli-printing-press/internal/llmpolish"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ catalogfs "github.com/mvanhorn/cli-printing-press/v2/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/docspec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/generator"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/graphql"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llm"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llmpolish"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
"github.com/spf13/cobra"
"gopkg.in/yaml.v3"
)
diff --git a/internal/cli/scorecard.go b/internal/cli/scorecard.go
index 620b20f1..f8d03776 100644
--- a/internal/cli/scorecard.go
+++ b/internal/cli/scorecard.go
@@ -7,7 +7,7 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/verify.go b/internal/cli/verify.go
index 4962ef41..09b27dac 100644
--- a/internal/cli/verify.go
+++ b/internal/cli/verify.go
@@ -6,8 +6,8 @@ import (
"os"
"path/filepath"
- "github.com/mvanhorn/cli-printing-press/internal/artifacts"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/artifacts"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/vision.go b/internal/cli/vision.go
index f1cac433..f0b332d2 100644
--- a/internal/cli/vision.go
+++ b/internal/cli/vision.go
@@ -6,8 +6,8 @@ import (
"os"
"path/filepath"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
- "github.com/mvanhorn/cli-printing-press/internal/vision"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/vision"
"github.com/spf13/cobra"
)
diff --git a/internal/cli/vision_test.go b/internal/cli/vision_test.go
index 7c6d0bf2..3154ced6 100644
--- a/internal/cli/vision_test.go
+++ b/internal/cli/vision_test.go
@@ -4,7 +4,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/cli/workflow_verify.go b/internal/cli/workflow_verify.go
index 90c1e18c..555d55cb 100644
--- a/internal/cli/workflow_verify.go
+++ b/internal/cli/workflow_verify.go
@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
"github.com/spf13/cobra"
)
diff --git a/internal/crowdsniff/specgen.go b/internal/crowdsniff/specgen.go
index 118cb356..78db97b3 100644
--- a/internal/crowdsniff/specgen.go
+++ b/internal/crowdsniff/specgen.go
@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// BuildSpec assembles a valid spec.APISpec from aggregated endpoints.
diff --git a/internal/crowdsniff/specgen_test.go b/internal/crowdsniff/specgen_test.go
index 3fec1b12..0d4540fc 100644
--- a/internal/crowdsniff/specgen_test.go
+++ b/internal/crowdsniff/specgen_test.go
@@ -3,7 +3,7 @@ package crowdsniff
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/docspec/docspec.go b/internal/docspec/docspec.go
index 2001bbc4..27402c84 100644
--- a/internal/docspec/docspec.go
+++ b/internal/docspec/docspec.go
@@ -8,8 +8,8 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/llm"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llm"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
var (
diff --git a/internal/generator/async_detect.go b/internal/generator/async_detect.go
index 1645ec3b..2ab11aef 100644
--- a/internal/generator/async_detect.go
+++ b/internal/generator/async_detect.go
@@ -4,7 +4,7 @@ import (
"regexp"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// AsyncJobInfo describes one async-job endpoint detected from a spec.
diff --git a/internal/generator/async_detect_test.go b/internal/generator/async_detect_test.go
index 0aa8015b..0ab89f2a 100644
--- a/internal/generator/async_detect_test.go
+++ b/internal/generator/async_detect_test.go
@@ -3,7 +3,7 @@ package generator
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/generator/auth_optional_test.go b/internal/generator/auth_optional_test.go
index 784c3516..2cf7077b 100644
--- a/internal/generator/auth_optional_test.go
+++ b/internal/generator/auth_optional_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/body_collision_test.go b/internal/generator/body_collision_test.go
index 67895208..3e495850 100644
--- a/internal/generator/body_collision_test.go
+++ b/internal/generator/body_collision_test.go
@@ -9,7 +9,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/entity_mapper.go b/internal/generator/entity_mapper.go
index 67cc7428..da9adbd4 100644
--- a/internal/generator/entity_mapper.go
+++ b/internal/generator/entity_mapper.go
@@ -3,8 +3,8 @@ package generator
import (
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/profiler"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/profiler"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
type WorkflowTemplateContext struct {
diff --git a/internal/generator/enum_validation_test.go b/internal/generator/enum_validation_test.go
index a46ac647..c84651d5 100644
--- a/internal/generator/enum_validation_test.go
+++ b/internal/generator/enum_validation_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/first_command_example.go b/internal/generator/first_command_example.go
index aa17e527..1f67b466 100644
--- a/internal/generator/first_command_example.go
+++ b/internal/generator/first_command_example.go
@@ -3,7 +3,7 @@ package generator
import (
"sort"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// firstCommandExample returns a runnable "resource [endpoint]" path for docs
diff --git a/internal/generator/first_command_example_test.go b/internal/generator/first_command_example_test.go
index c3c155a5..0b6a6d08 100644
--- a/internal/generator/first_command_example_test.go
+++ b/internal/generator/first_command_example_test.go
@@ -3,7 +3,7 @@ package generator
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/generator/flag_collision.go b/internal/generator/flag_collision.go
index 41750aec..5452b3ec 100644
--- a/internal/generator/flag_collision.go
+++ b/internal/generator/flag_collision.go
@@ -3,7 +3,7 @@ package generator
import (
"fmt"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// dedupeFlagIdentifiers ensures that no two non-positional params or body
diff --git a/internal/generator/flag_collision_test.go b/internal/generator/flag_collision_test.go
index 1010d6ac..6f857894 100644
--- a/internal/generator/flag_collision_test.go
+++ b/internal/generator/flag_collision_test.go
@@ -9,7 +9,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/generator.go b/internal/generator/generator.go
index 84ae2de1..ff9b721d 100644
--- a/internal/generator/generator.go
+++ b/internal/generator/generator.go
@@ -17,10 +17,10 @@ import (
"time"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/profiler"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/profiler"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
diff --git a/internal/generator/generator_test.go b/internal/generator/generator_test.go
index 9e01ea40..862d4cbe 100644
--- a/internal/generator/generator_test.go
+++ b/internal/generator/generator_test.go
@@ -12,11 +12,11 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/browsersniff"
- "github.com/mvanhorn/cli-printing-press/internal/graphql"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/browsersniff"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/graphql"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/json_string_validation_test.go b/internal/generator/json_string_validation_test.go
index 0e3c147a..8c436ab0 100644
--- a/internal/generator/json_string_validation_test.go
+++ b/internal/generator/json_string_validation_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/plan_generate.go b/internal/generator/plan_generate.go
index f3735a46..7f6764cf 100644
--- a/internal/generator/plan_generate.go
+++ b/internal/generator/plan_generate.go
@@ -11,7 +11,7 @@ import (
"text/template"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
diff --git a/internal/generator/plan_generate_test.go b/internal/generator/plan_generate_test.go
index a165e3c9..74017066 100644
--- a/internal/generator/plan_generate_test.go
+++ b/internal/generator/plan_generate_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/promoted_presence_check_test.go b/internal/generator/promoted_presence_check_test.go
index 65742796..6c5bbdf3 100644
--- a/internal/generator/promoted_presence_check_test.go
+++ b/internal/generator/promoted_presence_check_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/readme_test.go b/internal/generator/readme_test.go
index fe3413d7..ca2fa3f2 100644
--- a/internal/generator/readme_test.go
+++ b/internal/generator/readme_test.go
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/schema_builder.go b/internal/generator/schema_builder.go
index 928563f0..ed38c8fc 100644
--- a/internal/generator/schema_builder.go
+++ b/internal/generator/schema_builder.go
@@ -4,7 +4,7 @@ import (
"strings"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
type TableDef struct {
diff --git a/internal/generator/schema_builder_test.go b/internal/generator/schema_builder_test.go
index 53d2acf7..7fd379db 100644
--- a/internal/generator/schema_builder_test.go
+++ b/internal/generator/schema_builder_test.go
@@ -3,7 +3,7 @@ package generator
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/generator/session_handshake_test.go b/internal/generator/session_handshake_test.go
index 4c17abf6..22b8aa40 100644
--- a/internal/generator/session_handshake_test.go
+++ b/internal/generator/session_handshake_test.go
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// TestSessionHandshakeGeneration verifies the generator emits a working
diff --git a/internal/generator/skill_test.go b/internal/generator/skill_test.go
index ac720428..6dae0d17 100644
--- a/internal/generator/skill_test.go
+++ b/internal/generator/skill_test.go
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
diff --git a/internal/generator/types_keyword_test.go b/internal/generator/types_keyword_test.go
index 1df5af86..ca307ec8 100644
--- a/internal/generator/types_keyword_test.go
+++ b/internal/generator/types_keyword_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/require"
)
diff --git a/internal/generator/validate.go b/internal/generator/validate.go
index 5c30cd12..2e1ccb44 100644
--- a/internal/generator/validate.go
+++ b/internal/generator/validate.go
@@ -10,8 +10,8 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/artifacts"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/artifacts"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
)
type validationGate struct {
diff --git a/internal/generator/vision_templates.go b/internal/generator/vision_templates.go
index 69c14e4a..1997479d 100644
--- a/internal/generator/vision_templates.go
+++ b/internal/generator/vision_templates.go
@@ -1,7 +1,7 @@
package generator
import (
- "github.com/mvanhorn/cli-printing-press/internal/vision"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/vision"
)
// VisionTemplateSet defines which visionary templates to include in generation.
diff --git a/internal/graphql/parser.go b/internal/graphql/parser.go
index a0c7628c..983b99f1 100644
--- a/internal/graphql/parser.go
+++ b/internal/graphql/parser.go
@@ -9,7 +9,7 @@ import (
"strings"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
diff --git a/internal/graphql/parser_test.go b/internal/graphql/parser_test.go
index a214ccbb..f70ad934 100644
--- a/internal/graphql/parser_test.go
+++ b/internal/graphql/parser_test.go
@@ -3,7 +3,7 @@ package graphql
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/llmpolish/polish.go b/internal/llmpolish/polish.go
index 8bbd652f..633115e8 100644
--- a/internal/llmpolish/polish.go
+++ b/internal/llmpolish/polish.go
@@ -6,7 +6,7 @@ import (
"os"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/llm"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llm"
)
// PolishRequest defines what the polish pass needs.
diff --git a/internal/llmpolish/vision.go b/internal/llmpolish/vision.go
index 11637ccf..fc34557b 100644
--- a/internal/llmpolish/vision.go
+++ b/internal/llmpolish/vision.go
@@ -6,9 +6,9 @@ import (
"sort"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/llm"
- "github.com/mvanhorn/cli-printing-press/internal/profiler"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llm"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/profiler"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// VisionCustomization holds LLM-generated customizations for vision templates.
diff --git a/internal/llmpolish/vision_test.go b/internal/llmpolish/vision_test.go
index 820be95d..b26f845e 100644
--- a/internal/llmpolish/vision_test.go
+++ b/internal/llmpolish/vision_test.go
@@ -5,8 +5,8 @@ import (
"os"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/profiler"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/profiler"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/megamcp/metatools.go b/internal/megamcp/metatools.go
index 67249fe5..5038b182 100644
--- a/internal/megamcp/metatools.go
+++ b/internal/megamcp/metatools.go
@@ -12,9 +12,9 @@ import (
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
)
// RegisterMetaTools registers the 6 agent-facing discovery and activation tools.
diff --git a/internal/megamcp/types.go b/internal/megamcp/types.go
index 3ad86f3a..2e854b6f 100644
--- a/internal/megamcp/types.go
+++ b/internal/megamcp/types.go
@@ -1,7 +1,7 @@
package megamcp
import (
- "github.com/mvanhorn/cli-printing-press/internal/pipeline"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/pipeline"
)
// Re-export manifest types from pipeline to avoid duplication.
diff --git a/internal/openapi/detect.go b/internal/openapi/detect.go
index ee256a0c..be9ae13f 100644
--- a/internal/openapi/detect.go
+++ b/internal/openapi/detect.go
@@ -3,7 +3,7 @@ package openapi
import (
"bytes"
- "github.com/mvanhorn/cli-printing-press/internal/graphql"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/graphql"
)
func IsOpenAPI(data []byte) bool {
diff --git a/internal/openapi/parser.go b/internal/openapi/parser.go
index b2c1cb78..abf34736 100644
--- a/internal/openapi/parser.go
+++ b/internal/openapi/parser.go
@@ -13,8 +13,8 @@ import (
"unicode"
"github.com/getkin/kin-openapi/openapi3"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
diff --git a/internal/openapi/parser_test.go b/internal/openapi/parser_test.go
index b43e208e..6052e853 100644
--- a/internal/openapi/parser_test.go
+++ b/internal/openapi/parser_test.go
@@ -10,9 +10,9 @@ import (
"testing"
"github.com/getkin/kin-openapi/openapi3"
- "github.com/mvanhorn/cli-printing-press/internal/generator"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/generator"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/patch/dropins.go b/internal/patch/dropins.go
index c4a7aff6..c2105d4f 100644
--- a/internal/patch/dropins.go
+++ b/internal/patch/dropins.go
@@ -10,7 +10,7 @@ import (
"text/template"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/generator"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/generator"
)
// dropin describes one file the patcher creates from a template.
diff --git a/internal/pipeline/climanifest.go b/internal/pipeline/climanifest.go
index 55fc346e..a3c71cbc 100644
--- a/internal/pipeline/climanifest.go
+++ b/internal/pipeline/climanifest.go
@@ -10,12 +10,12 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/catalog"
- catalogpkg "github.com/mvanhorn/cli-printing-press/internal/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/catalog"
+ catalogpkg "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
)
// CLIManifestFilename is the name of the manifest file written to each
diff --git a/internal/pipeline/climanifest_test.go b/internal/pipeline/climanifest_test.go
index e4b540bf..145d64c3 100644
--- a/internal/pipeline/climanifest_test.go
+++ b/internal/pipeline/climanifest_test.go
@@ -9,8 +9,8 @@ import (
"testing"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
diff --git a/internal/pipeline/contracts_test.go b/internal/pipeline/contracts_test.go
index 9e252c6c..acd7f02e 100644
--- a/internal/pipeline/contracts_test.go
+++ b/internal/pipeline/contracts_test.go
@@ -7,10 +7,10 @@ import (
"strings"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/generator"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/generator"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/pipeline/dogfood.go b/internal/pipeline/dogfood.go
index a0f5f268..36285e67 100644
--- a/internal/pipeline/dogfood.go
+++ b/internal/pipeline/dogfood.go
@@ -13,9 +13,9 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- openapiparser "github.com/mvanhorn/cli-printing-press/internal/openapi"
- apispec "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ openapiparser "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ apispec "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"gopkg.in/yaml.v3"
)
diff --git a/internal/pipeline/fullrun.go b/internal/pipeline/fullrun.go
index 1fc99e55..a1829543 100644
--- a/internal/pipeline/fullrun.go
+++ b/internal/pipeline/fullrun.go
@@ -11,8 +11,8 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/llmpolish"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llmpolish"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
"gopkg.in/yaml.v3"
)
diff --git a/internal/pipeline/lock.go b/internal/pipeline/lock.go
index ca47604b..44d9f0ca 100644
--- a/internal/pipeline/lock.go
+++ b/internal/pipeline/lock.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
)
const (
diff --git a/internal/pipeline/merge.go b/internal/pipeline/merge.go
index cac4c76a..b7e1cb5d 100644
--- a/internal/pipeline/merge.go
+++ b/internal/pipeline/merge.go
@@ -1,7 +1,7 @@
package pipeline
import (
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// MergeOverlay applies an overlay onto an APISpec, modifying it in place.
diff --git a/internal/pipeline/merge_test.go b/internal/pipeline/merge_test.go
index 82c62d91..4cb0d4e6 100644
--- a/internal/pipeline/merge_test.go
+++ b/internal/pipeline/merge_test.go
@@ -3,7 +3,7 @@ package pipeline
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/pipeline/paths.go b/internal/pipeline/paths.go
index 0987c865..29dd6f24 100644
--- a/internal/pipeline/paths.go
+++ b/internal/pipeline/paths.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
)
func PressHome() string {
diff --git a/internal/pipeline/publish.go b/internal/pipeline/publish.go
index 13125e73..76964c27 100644
--- a/internal/pipeline/publish.go
+++ b/internal/pipeline/publish.go
@@ -10,13 +10,13 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/catalog"
- catalogpkg "github.com/mvanhorn/cli-printing-press/internal/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/graphql"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- "github.com/mvanhorn/cli-printing-press/internal/openapi"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
- "github.com/mvanhorn/cli-printing-press/internal/version"
+ "github.com/mvanhorn/cli-printing-press/v2/catalog"
+ catalogpkg "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/graphql"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/openapi"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/version"
"gopkg.in/yaml.v3"
)
diff --git a/internal/pipeline/renamecli.go b/internal/pipeline/renamecli.go
index 5a069ac9..a51ce56c 100644
--- a/internal/pipeline/renamecli.go
+++ b/internal/pipeline/renamecli.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
)
// renameExtensions lists file extensions walked during CLI rename.
diff --git a/internal/pipeline/renamecli_test.go b/internal/pipeline/renamecli_test.go
index 73659a58..dca74cee 100644
--- a/internal/pipeline/renamecli_test.go
+++ b/internal/pipeline/renamecli_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/pipeline/research.go b/internal/pipeline/research.go
index 20680623..84eb5e37 100644
--- a/internal/pipeline/research.go
+++ b/internal/pipeline/research.go
@@ -14,9 +14,9 @@ import (
"strings"
"time"
- catalogfs "github.com/mvanhorn/cli-printing-press/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/catalog"
- "github.com/mvanhorn/cli-printing-press/internal/llm"
+ catalogfs "github.com/mvanhorn/cli-printing-press/v2/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/catalog"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/llm"
)
// ResearchResult holds the output of the research phase.
diff --git a/internal/pipeline/runtime.go b/internal/pipeline/runtime.go
index fb23585b..9509fc2d 100644
--- a/internal/pipeline/runtime.go
+++ b/internal/pipeline/runtime.go
@@ -15,9 +15,9 @@ import (
"strings"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/artifacts"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
- apispec "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/artifacts"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
+ apispec "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// VerifyConfig configures a runtime verification run.
diff --git a/internal/pipeline/runtime_test.go b/internal/pipeline/runtime_test.go
index 52b94af4..0d512b27 100644
--- a/internal/pipeline/runtime_test.go
+++ b/internal/pipeline/runtime_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"
- apispec "github.com/mvanhorn/cli-printing-press/internal/spec"
+ apispec "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/pipeline/scorecard.go b/internal/pipeline/scorecard.go
index 360769bc..49899375 100644
--- a/internal/pipeline/scorecard.go
+++ b/internal/pipeline/scorecard.go
@@ -10,7 +10,7 @@ import (
"strconv"
"strings"
- apispec "github.com/mvanhorn/cli-printing-press/internal/spec"
+ apispec "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// infraCoreFiles are CLI infrastructure files excluded from workflow/insight scoring.
diff --git a/internal/pipeline/spec_detect.go b/internal/pipeline/spec_detect.go
index 5f9cc456..4f52dade 100644
--- a/internal/pipeline/spec_detect.go
+++ b/internal/pipeline/spec_detect.go
@@ -6,7 +6,7 @@ import (
"os"
"slices"
- apispec "github.com/mvanhorn/cli-printing-press/internal/spec"
+ apispec "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// isInternalYAMLSpec returns true if data looks like an internal YAML spec
diff --git a/internal/pipeline/state.go b/internal/pipeline/state.go
index 6b3dbc69..3ca4a51f 100644
--- a/internal/pipeline/state.go
+++ b/internal/pipeline/state.go
@@ -8,7 +8,7 @@ import (
"path/filepath"
"time"
- "github.com/mvanhorn/cli-printing-press/internal/naming"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/naming"
)
// Phase names in execution order.
diff --git a/internal/pipeline/toolsmanifest.go b/internal/pipeline/toolsmanifest.go
index 32dcf7ee..0bdbc0c6 100644
--- a/internal/pipeline/toolsmanifest.go
+++ b/internal/pipeline/toolsmanifest.go
@@ -11,7 +11,7 @@ import (
"strings"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
)
// ToolsManifestFilename is the name of the tools manifest file written to each
diff --git a/internal/pipeline/toolsmanifest_test.go b/internal/pipeline/toolsmanifest_test.go
index 43740d3d..7c9ad30f 100644
--- a/internal/pipeline/toolsmanifest_test.go
+++ b/internal/pipeline/toolsmanifest_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/pipeline/verify.go b/internal/pipeline/verify.go
index 16fa7dc3..01629421 100644
--- a/internal/pipeline/verify.go
+++ b/internal/pipeline/verify.go
@@ -11,7 +11,7 @@ import (
"time"
"unicode"
- "github.com/mvanhorn/cli-printing-press/internal/artifacts"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/artifacts"
)
type Verifier struct {
diff --git a/internal/profiler/profiler.go b/internal/profiler/profiler.go
index a5318d80..917a9d35 100644
--- a/internal/profiler/profiler.go
+++ b/internal/profiler/profiler.go
@@ -5,8 +5,8 @@ import (
"sort"
"strings"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
- "github.com/mvanhorn/cli-printing-press/internal/vision"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/vision"
)
type DomainArchetype string
diff --git a/internal/profiler/profiler_test.go b/internal/profiler/profiler_test.go
index 81173bdc..c58ae004 100644
--- a/internal/profiler/profiler_test.go
+++ b/internal/profiler/profiler_test.go
@@ -3,7 +3,7 @@ package profiler
import (
"testing"
- "github.com/mvanhorn/cli-printing-press/internal/spec"
+ "github.com/mvanhorn/cli-printing-press/v2/internal/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/internal/version/version.go b/internal/version/version.go
index 63a22d46..9b3d7e46 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -1,6 +1,7 @@
package version
import (
+ "regexp"
"runtime/debug"
"strings"
)
@@ -9,22 +10,35 @@ import (
// via ldflags for tagged releases, or falls back to the hardcoded value.
var Version = "2.3.6" // x-release-please-version
+// pseudoVersionSuffix matches the trailing `yyyymmddhhmmss-abcdefabcdef`
+// (14-digit timestamp + 12-char commit hash) shared by every Go pseudo-version
+// form. The character before the timestamp may be `-` (form 1: vX.0.0-ts-hash)
+// or `.` (forms 2/3: vX.Y.Z-pre.0.ts-hash). See
+// https://go.dev/ref/mod#pseudo-versions.
+var pseudoVersionSuffix = regexp.MustCompile(`\d{14}-[0-9a-f]{12}$`)
+
func init() {
info, ok := debug.ReadBuildInfo()
if !ok {
return
}
- v := info.Main.Version
- // Only use the build info version when it's a real tagged release.
- // Skip empty, "(devel)", and pseudo-versions like "v0.0.0-20260328...".
+ if v := versionFromBuildInfo(info.Main.Version); v != "" {
+ Version = v
+ }
+}
+
+// versionFromBuildInfo returns the cleaned tagged version from a runtime
+// build-info string, or "" when the value should be ignored (empty, devel
+// build, or any pseudo-version). When this returns "", the hardcoded Version
+// fallback is used.
+func versionFromBuildInfo(v string) string {
if v == "" || v == "(devel)" {
- return
+ return ""
}
- trimmed := strings.TrimPrefix(v, "v")
- if strings.HasPrefix(trimmed, "0.0.0-") {
- return
+ if pseudoVersionSuffix.MatchString(v) {
+ return ""
}
- Version = trimmed
+ return strings.TrimPrefix(v, "v")
}
// Get returns the current version string.
diff --git a/internal/version/version_test.go b/internal/version/version_test.go
index 4e19bb21..be1a0b36 100644
--- a/internal/version/version_test.go
+++ b/internal/version/version_test.go
@@ -15,3 +15,28 @@ func TestVersionIsValidSemver(t *testing.T) {
func TestGetReturnsVersion(t *testing.T) {
assert.Equal(t, Version, Get())
}
+
+func TestVersionFromBuildInfo(t *testing.T) {
+ tests := []struct {
+ name string
+ in string
+ want string
+ }{
+ {"empty", "", ""},
+ {"devel", "(devel)", ""},
+ {"tagged release", "v2.3.6", "2.3.6"},
+ {"tagged release no v", "2.3.6", "2.3.6"},
+ {"v3 tagged release", "v3.0.0", "3.0.0"},
+ // Pseudo-versions in every form Go can synthesize. See
+ // https://go.dev/ref/mod#pseudo-versions.
+ {"pseudo no prior tag", "v0.0.0-20260328120000-abcdef123456", ""},
+ {"pseudo after release", "v1.3.3-0.20260426011609-42b0f1f4a92a", ""},
+ {"pseudo after prerelease", "v2.4.0-pre.0.20260426011609-42b0f1f4a92a", ""},
+ {"pseudo without v prefix", "1.3.3-0.20260426011609-42b0f1f4a92a", ""},
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ assert.Equal(t, tt.want, versionFromBuildInfo(tt.in))
+ })
+ }
+}
diff --git a/skills/printing-press-catalog/SKILL.md b/skills/printing-press-catalog/SKILL.md
index 3966d156..7c8b0676 100644
--- a/skills/printing-press-catalog/SKILL.md
+++ b/skills/printing-press-catalog/SKILL.md
@@ -31,7 +31,7 @@ Browse and install pre-built Go CLIs for popular APIs.
## Prerequisites
- Go 1.21+ installed
-- `printing-press` binary on PATH (install with `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest`)
+- `printing-press` binary on PATH (install with `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest`)
## Setup
@@ -55,7 +55,7 @@ elif ! command -v printing-press >/dev/null 2>&1; then
echo "Add GOPATH/bin to your PATH: export PATH=\"\$HOME/go/bin:\$PATH\""
else
echo "printing-press binary not found."
- echo "Install with: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ echo "Install with: go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest"
fi
return 1 2>/dev/null || exit 1
fi
@@ -74,7 +74,7 @@ mkdir -p "$PRESS_RUNSTATE" "$PRESS_LIBRARY"
```
<!-- PRESS_SETUP_CONTRACT_END -->
-After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
+After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
Generated CLIs are published to `$PRESS_LIBRARY/`, not to the repo.
diff --git a/skills/printing-press-publish/SKILL.md b/skills/printing-press-publish/SKILL.md
index 19cae8a9..10959d03 100644
--- a/skills/printing-press-publish/SKILL.md
+++ b/skills/printing-press-publish/SKILL.md
@@ -45,7 +45,7 @@ elif ! command -v printing-press >/dev/null 2>&1; then
echo "Add GOPATH/bin to your PATH: export PATH=\"\$HOME/go/bin:\$PATH\""
else
echo "printing-press binary not found."
- echo "Install with: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ echo "Install with: go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest"
fi
return 1 2>/dev/null || exit 1
fi
@@ -66,7 +66,7 @@ mkdir -p "$PRESS_RUNSTATE" "$PRESS_LIBRARY" "$PRESS_MANUSCRIPTS" "$PRESS_CURRENT
```
<!-- PRESS_SETUP_CONTRACT_END -->
-After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
+After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
## Configuration
diff --git a/skills/printing-press-score/SKILL.md b/skills/printing-press-score/SKILL.md
index 03bdf02f..7909af49 100644
--- a/skills/printing-press-score/SKILL.md
+++ b/skills/printing-press-score/SKILL.md
@@ -27,7 +27,7 @@ Score generated CLIs against the Steinberger bar. Supports rescoring, scoring by
## Prerequisites
- Go 1.21+ installed
-- `printing-press` binary on PATH (install with `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest`)
+- `printing-press` binary on PATH (install with `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest`)
## Step 0: Setup
@@ -51,7 +51,7 @@ elif ! command -v printing-press >/dev/null 2>&1; then
echo "Add GOPATH/bin to your PATH: export PATH=\"\$HOME/go/bin:\$PATH\""
else
echo "printing-press binary not found."
- echo "Install with: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ echo "Install with: go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest"
fi
return 1 2>/dev/null || exit 1
fi
@@ -72,7 +72,7 @@ mkdir -p "$PRESS_RUNSTATE" "$PRESS_LIBRARY" "$PRESS_MANUSCRIPTS" "$PRESS_CURRENT
```
<!-- PRESS_SETUP_CONTRACT_END -->
-After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
+After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
Current-run state is resolved from `$PRESS_RUNSTATE`. Published CLIs are resolved from `$PRESS_LIBRARY`. Archived manuscripts are resolved from `$PRESS_MANUSCRIPTS`.
@@ -271,7 +271,7 @@ Domain Correctness (Tier 2)
## Error Handling
-- If the printing-press binary is not on PATH → show install instructions: `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest`
+- If the printing-press binary is not on PATH → show install instructions: `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest`
- If the scorecard command fails → report the error with the full stderr output
- If a CLI directory doesn't exist → report which name couldn't be resolved
- If JSON parsing fails → show the raw output and report the parsing error
diff --git a/skills/printing-press/SKILL.md b/skills/printing-press/SKILL.md
index 9320530f..171dcce8 100644
--- a/skills/printing-press/SKILL.md
+++ b/skills/printing-press/SKILL.md
@@ -253,11 +253,11 @@ elif ! command -v printing-press >/dev/null 2>&1; then
echo "Added ~/go/bin to PATH"
elif command -v go >/dev/null 2>&1; then
echo "printing-press not found. Installing..."
- GOPRIVATE=github.com/mvanhorn/* go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest
+ GOPRIVATE=github.com/mvanhorn/* go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest
export PATH="$HOME/go/bin:$PATH"
else
echo "printing-press binary not found and Go is not installed."
- echo "Install Go first, then run: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ echo "Install Go first, then run: go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest"
return 1 2>/dev/null || exit 1
fi
fi
@@ -307,7 +307,7 @@ CODEX_CONSECUTIVE_FAILURES=0
```
<!-- PRESS_SETUP_CONTRACT_END -->
-After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
+After running the setup contract, check binary version compatibility. Read the `min-binary-version` field from this skill's YAML frontmatter. Run `printing-press version --json` and parse the version from the output. Compare it to `min-binary-version` using semver rules. If the installed binary is older than the minimum, warn the user: "printing-press binary vX.Y.Z is older than the minimum required vA.B.C. Run `go install github.com/mvanhorn/cli-printing-press/v2/cmd/printing-press@latest` to update." Continue anyway but surface the warning prominently.
After you know `<api>`, initialize the run-scoped artifact paths:
← 42b0f1f4 chore(main): release 2.3.6 (#297)
·
back to Cli Printing Press
·
fix(cli): use strconv.Atoi for major-version parsing in guar 0cc70170 →