Skip to content

Commit

Permalink
🧹 add info line on version update
Browse files Browse the repository at this point in the history
The line you can use in your browser to open the git commit.

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Sep 25, 2023
1 parent da98e29 commit 723ae1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions providers-sdk/v1/util/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,16 @@ func commitChanges(confs updateConfs) error {
}

log.Info().Msg("comitted changes for " + strings.Join(confs.titles(), ", "))
log.Info().Msg("run: git push -u origin " + branchName)
log.Info().Msg("running: git push -u origin " + branchName)

// Not sure why the auth method doesn't work... so we exec here
err = exec.Command("git", "push", "-u", "origin", branchName).Run()
if err != nil {
return err
}

log.Info().Msg("updates pushed successfully, open: \n\t" +
"https://github.com/mondoohq/cnquery/compare/" + branchName + "?expand=1")
return nil
}

Expand Down Expand Up @@ -372,7 +374,9 @@ func countChangesSince(conf *providerConf, repoPath string) int {
return count
}
}
fmt.Println()
if !fastMode {
fmt.Println()
}

if found == nil {
log.Warn().Msg("looks like there is no previous version in your commit history => we assume this is the first version commit")
Expand Down

0 comments on commit 723ae1f

Please sign in to comment.