Skip to content

Commit

Permalink
refactor: replace local version package with external go-version package
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Feb 24, 2025
1 parent 76f29a4 commit 4c769d8
Show file tree
Hide file tree
Showing 21 changed files with 18 additions and 1,530 deletions.
2 changes: 1 addition & 1 deletion cmd/project/project_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/spf13/cobra"

"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

var projectCreateCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/project_extension_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/shopware/shopware-cli/extension"
"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/shop"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

var projectExtensionUploadCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion extension/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"strings"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

type App struct {
Expand Down
2 changes: 1 addition & 1 deletion extension/asset_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/shopware/shopware-cli/internal/asset"
"github.com/shopware/shopware-cli/internal/esbuild"
"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion extension/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"path"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

type ShopwareBundle struct {
Expand Down
2 changes: 1 addition & 1 deletion extension/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/shopware/shopware-cli/internal/phplint"
"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

var ErrPlatformInvalidType = errors.New("invalid composer type")
Expand Down
2 changes: 1 addition & 1 deletion extension/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/shopware/shopware-cli/internal/asset"
"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

func GetShopwareProjectConstraint(project string) (*version.Constraints, error) {
Expand Down
2 changes: 1 addition & 1 deletion extension/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"strings"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion extension/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/shopware/shopware-cli/internal/changelog"

"github.com/shopware/shopware-cli/logging"
"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion extension/zip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

func TestDetermineMinVersion(t *testing.T) {
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

require github.com/otiai10/mint v1.6.3 // indirect
require (
github.com/otiai10/mint v1.6.3 // indirect
github.com/shyim/go-version v0.0.0-20240530110323-4b7091cee42c // indirect
)

replace github.com/doutorfinancas/go-mad v0.0.0-20240205120830-463c1e9760f0 => github.com/shyim/go-mad v0.0.0-20250212101107-a15f8dde1bce

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ github.com/shyim/go-htmlprinter v0.0.0-20250212091723-cc11f7bf036d h1:H4beXhaWS4
github.com/shyim/go-htmlprinter v0.0.0-20250212091723-cc11f7bf036d/go.mod h1:7pOn8MeVA6hUnFkgkXpNFVjGtNnh2/AeZTDwXwWtNp8=
github.com/shyim/go-mad v0.0.0-20250212101107-a15f8dde1bce h1:xQidim5dm481TchU2tzi7SjQwfmD6ombHKPHFsUL8Z4=
github.com/shyim/go-mad v0.0.0-20250212101107-a15f8dde1bce/go.mod h1:yfWKFJm6NisKuie2cdH5zUttu4gZYHa/CY7CHpA3tMU=
github.com/shyim/go-version v0.0.0-20240530110323-4b7091cee42c h1:3venOxJzcKW4Xi5N9ipFNrnwAS4g1yTOTcBssDHHgQA=
github.com/shyim/go-version v0.0.0-20240530110323-4b7091cee42c/go.mod h1:z47ygE4N7EC0H58FP5j5cXZtl1pSnfjwYJsHtiVtcwU=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
Expand Down
2 changes: 1 addition & 1 deletion internal/account-api/producer_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/microcosm-cc/bluemonday"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

type SoftwareVersionList []SoftwareVersion
Expand Down
2 changes: 1 addition & 1 deletion shop/version_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path"

"github.com/shopware/shopware-cli/version"
"github.com/shyim/go-version"
)

var (
Expand Down
Loading

0 comments on commit 4c769d8

Please sign in to comment.