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

feat: switch from using the os/exec package to using mvdan.sh for git operations #315

Merged
merged 5 commits into from
Jan 19, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
debugging
ga-paul-t committed Jan 19, 2023

Verified

This commit was signed with the committer’s verified signature.
jameslamb James Lamb
commit af8bae10b1b1a32492e609a5435cb7663a447a3f
5 changes: 5 additions & 0 deletions internal/task/bump/bump.go
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ SOFTWARE.
package bump

import (
"fmt"

"github.com/apex/log"
"github.com/gembaadvantage/uplift/internal/context"
"github.com/gembaadvantage/uplift/internal/git"
@@ -85,6 +87,9 @@ func (t Task) Run(ctx *context.Context) error {
continue
}

fmt.Println("About to stage file at path")
fmt.Println(resolvedBump)

if err := git.Stage(resolvedBump); err != nil {
return err
}
4 changes: 4 additions & 0 deletions internal/task/bump/regex.go
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ package bump

import (
"errors"
"fmt"
"os"
"regexp"
"strings"
@@ -92,6 +93,9 @@ func regexBump(ctx *context.Context, path string, bumps []config.RegexBump) (boo
return false, nil
}

fmt.Println("Writing to file at path")
fmt.Println(path)

return true, os.WriteFile(path, []byte(str), 0o644)
}

2 changes: 2 additions & 0 deletions internal/task/bump/regex_test.go
Original file line number Diff line number Diff line change
@@ -544,6 +544,8 @@ description: This is a test chart
version: 0.1.0
appVersion: v0.1.0`)

fmt.Println(file)

ctx := &context.Context{
NextVersion: semver.Version{
Raw: "v0.1.1",