Skip to content

Commit

Permalink
Fix commit msg (#25)
Browse files Browse the repository at this point in the history
* fixed commit msg
* fixed upgrade to newRt version
  • Loading branch information
ATGardner authored Jul 20, 2021
1 parent 9882c0c commit a93725a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.0.30
VERSION=v0.0.31
OUT_DIR=dist
YEAR?=$(shell date +"%Y")

Expand Down
6 changes: 1 addition & 5 deletions cmd/commands/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ func NewRuntimeUpgradeCommand() *cobra.Command {
}

func RunRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
if opts.Version == nil {
opts.Version = store.Get().Version.Version
}

newRt, err := runtime.Download(opts.Version, opts.RuntimeName)
if err != nil {
return fmt.Errorf("failed to download runtime definition: %w", err)
Expand Down Expand Up @@ -432,7 +428,7 @@ func RunRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
return fmt.Errorf("failed to upgrade runtime: %w", err)
}

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

Expand Down
4 changes: 2 additions & 2 deletions docs/releases/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
### Linux
```bash
# download and extract the binary
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.30/cf-linux-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.31/cf-linux-amd64.tar.gz | tar zx

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

# move the binary to your $PATH
mv ./cf-darwin-amd64 /usr/local/bin/cf
Expand Down
2 changes: 1 addition & 1 deletion manifests/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: "{{ namespace }}"
spec:
defVersion: 1.0.0
version: 0.0.30
version: 0.0.31
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
components:
- name: events
Expand Down
2 changes: 1 addition & 1 deletion pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (r *RuntimeSpec) upgrade(fs fs.FS, newRt *RuntimeSpec) ([]AppDef, error) {
if curComponent != nil {
log.G().Infof("Upgrading '%s'", newComponent.Name)
curURL := buildFullURL(curComponent.URL, r.Version)
newURL := buildFullURL(newComponent.URL, r.Version)
newURL := buildFullURL(newComponent.URL, newRt.Version)
baseFilename := fs.Join(apstore.Default.AppsDir, curComponent.Name, apstore.Default.BaseDir, "kustomization.yaml")
if err := updateKustomization(fs, baseFilename, curURL, newURL); err != nil {
return nil, fmt.Errorf("failed to upgrade app '%s': %w", curComponent.Name, err)
Expand Down

0 comments on commit a93725a

Please sign in to comment.