Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fixed old score-compose references #4

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ If you are interested in making a code contribution and would like to learn more

- [https://score.dev/)
- [https://github.com/score-spec/score-compose]
- [https://github.com/score-spec/score-k8s]

### **How do I make a contribution?**

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Alternative installation guides and implementations can be found in the [Score d

```
$ score-k8s init --help
The init subcommand will prepare the current directory for working with score-compose and write the initial
The init subcommand will prepare the current directory for working with score-k8s and write the initial
empty state and default provisioners file into the '.score-k8s' subdirectory.

The '.score-k8s' directory contains state that will be used to generate any Kubernetes resource manifests including
Expand All @@ -127,7 +127,7 @@ $ score-k8s generate --help
The generate command will convert Score files in the current Score state into a combined set of Kubernetes
manifests. All resources and links between Workloads will be resolved and provisioned as required.

"score-compose init" MUST be run first. An error will be thrown if the project directory is not present.
"score-k8s init" MUST be run first. An error will be thrown if the project directory is not present.

Usage:
score-k8s generate [flags]
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ require (
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand All @@ -99,6 +101,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -120,6 +125,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
Expand Down
2 changes: 1 addition & 1 deletion internal/project/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type ResourceExtras struct {

type State = framework.State[framework.NoExtras, framework.NoExtras, ResourceExtras]

// The StateDirectory holds the local state of the score-compose project, including any configuration, extensions,
// The StateDirectory holds the local state of the score-k8s project, including any configuration, extensions,
// plugins, or resource provisioning state when possible.
type StateDirectory struct {
// The path to the .score-k8s directory
Expand Down
4 changes: 2 additions & 2 deletions internal/provisioners/cmdprov/commandprov_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ func TestDecodeBinary_success(t *testing.T) {

func TestDecodeBinary_fail(t *testing.T) {
for k, v := range map[string]string{
"cmd://absolutely-unknown-score-compose-provisioner": "failed to find 'absolutely-unknown-score-compose-provisioner' on path: exec: \"absolutely-unknown-score-compose-provisioner\": executable file not found in $PATH",
"cmd://something/foo": "direct command reference cannot contain additional path parts",
"cmd://absolutely-unknown-score-provisioner": "failed to find 'absolutely-unknown-score-provisioner' on path: exec: \"absolutely-unknown-score-provisioner\": executable file not found in $PATH",
"cmd://something/foo": "direct command reference cannot contain additional path parts",
} {
t.Run(k, func(t *testing.T) {
_, err := decodeBinary(k)
Expand Down
10 changes: 7 additions & 3 deletions internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
)

// BuildVersionString constructs a version string by looking at the build metadata injected at build time.
// This is particularly useful when score-compose is stilled from the go module using go install.
// This is particularly useful when score-k8s is installed from the go module using go install.
func BuildVersionString() string {
versionNumber, buildTime, gitSha, isDirtySuffix := Version, "local", "unknown", ""
if info, ok := debug.ReadBuildInfo(); ok {
Expand All @@ -34,9 +34,13 @@ func BuildVersionString() string {
for _, setting := range info.Settings {
switch setting.Key {
case "vcs.time":
buildTime = setting.Value
if setting.Value != "" {
buildTime = setting.Value
}
case "vcs.revision":
gitSha = setting.Value
if setting.Value != "" {
gitSha = setting.Value
}
case "vcs.modified":
if setting.Value == "true" {
isDirtySuffix = "-dirty"
Expand Down
2 changes: 1 addition & 1 deletion main_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var generateCmd = &cobra.Command{
Long: `The generate command will convert Score files in the current Score state into a combined set of Kubernetes
manifests. All resources and links between Workloads will be resolved and provisioned as required.

"score-compose init" MUST be run first. An error will be thrown if the project directory is not present.
"score-k8s init" MUST be run first. An error will be thrown if the project directory is not present.
`,
Example: `
# Specify Score files
Expand Down
2 changes: 1 addition & 1 deletion main_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var initCmd = &cobra.Command{
Use: "init",
Args: cobra.NoArgs,
Short: "Initialise a new score-k8s project with local state directory and sample score file",
Long: `The init subcommand will prepare the current directory for working with score-compose and write the initial
Long: `The init subcommand will prepare the current directory for working with score-k8s and write the initial
empty state and default provisioners file into the '.score-k8s' subdirectory.

The '.score-k8s' directory contains state that will be used to generate any Kubernetes resource manifests including
Expand Down
Loading