Skip to content

Commit

Permalink
Check for new files
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislbr committed Jan 13, 2022
1 parent 642d35f commit 821a575
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ready.go
Expand Up @@ -58,11 +58,18 @@ func main() {
log.Fatalf("Error determining folders with changes: %v\n", err)
}

files, err := exec.Command("git", "diff", "--name-only", "HEAD").CombinedOutput()
changed, err := exec.Command("git", "diff", "--name-only", "HEAD").CombinedOutput()
if err != nil {
log.Fatalf("Error determining files with changes: %v\n", err)
}

new, err := exec.Command("git", "ls-files", "--others").CombinedOutput()
if err != nil {
log.Fatalf("Error determining new files: %v\n", err)
}

files := append(changed, new...)

if t.Directory == "" {
if len(files) == 0 {
continue
Expand Down

0 comments on commit 821a575

Please sign in to comment.