Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Simonis, Matthias authored and Simonis, Matthias committed Mar 1, 2024
1 parent a445368 commit 08308b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions golang/vaas/cmd/git-scan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ func main() {
log.Fatal("git rev-parse: ", err, string(rootDirectoryBytes))
}
rootDirectory := strings.Split(strings.ReplaceAll(string(rootDirectoryBytes), "\r\n", "\n"), "\n")[0]
log.Println("repository root directory: ", rootDirectory)

fetchBytesCommand := exec.Command("git", "fetch", remote, targetBranch)
fetchBytes, err := fetchBytesCommand.Output()
if err != nil {
log.Fatal("git fetch ", err, string(fetchBytes))
}
log.Println("fetch result: ", string(fetchBytes))

gitDiffCommand := exec.Command("git", "diff", "--name-only", targetBranch)
diffBytes, err := gitDiffCommand.Output()
if err != nil {
Expand All @@ -70,6 +73,7 @@ func main() {
log.Println("no changed files found in diff")
os.Exit(0)
}
log.Println("found changed files: ", string(diffBytes))

authenticator := authenticator.New(clientID, clientSecret, tokenUrl)

Expand Down

0 comments on commit 08308b3

Please sign in to comment.