Skip to content

Commit a93725a

Browse files
authored
Fix commit msg (#25)
* fixed commit msg * fixed upgrade to newRt version
1 parent 9882c0c commit a93725a

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.30
1+
VERSION=v0.0.31
22
OUT_DIR=dist
33
YEAR?=$(shell date +"%Y")
44

cmd/commands/runtime.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,6 @@ func NewRuntimeUpgradeCommand() *cobra.Command {
400400
}
401401

402402
func RunRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
403-
if opts.Version == nil {
404-
opts.Version = store.Get().Version.Version
405-
}
406-
407403
newRt, err := runtime.Download(opts.Version, opts.RuntimeName)
408404
if err != nil {
409405
return fmt.Errorf("failed to download runtime definition: %w", err)
@@ -432,7 +428,7 @@ func RunRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
432428
return fmt.Errorf("failed to upgrade runtime: %w", err)
433429
}
434430

435-
if _, err = r.Persist(ctx, &git.PushOptions{CommitMsg: fmt.Sprintf("Upgraded to %s", opts.Version)}); err != nil {
431+
if _, err = r.Persist(ctx, &git.PushOptions{CommitMsg: fmt.Sprintf("Upgraded to %s", newRt.Spec.Version)}); err != nil {
436432
return err
437433
}
438434

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
### Linux
99
```bash
1010
# download and extract the binary
11-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.30/cf-linux-amd64.tar.gz | tar zx
11+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.31/cf-linux-amd64.tar.gz | tar zx
1212

1313
# move the binary to your $PATH
1414
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -20,7 +20,7 @@ cf version
2020
### Mac
2121
```bash
2222
# download and extract the binary
23-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.30/cf-darwin-amd64.tar.gz | tar zx
23+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.31/cf-darwin-amd64.tar.gz | tar zx
2424

2525
# move the binary to your $PATH
2626
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.0
8-
version: 0.0.30
8+
version: 0.0.31
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/runtime/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (r *RuntimeSpec) upgrade(fs fs.FS, newRt *RuntimeSpec) ([]AppDef, error) {
167167
if curComponent != nil {
168168
log.G().Infof("Upgrading '%s'", newComponent.Name)
169169
curURL := buildFullURL(curComponent.URL, r.Version)
170-
newURL := buildFullURL(newComponent.URL, r.Version)
170+
newURL := buildFullURL(newComponent.URL, newRt.Version)
171171
baseFilename := fs.Join(apstore.Default.AppsDir, curComponent.Name, apstore.Default.BaseDir, "kustomization.yaml")
172172
if err := updateKustomization(fs, baseFilename, curURL, newURL); err != nil {
173173
return nil, fmt.Errorf("failed to upgrade app '%s': %w", curComponent.Name, err)

0 commit comments

Comments
 (0)