From c22e6ff41fbf8008829385bd43c79195d0f595ca Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 26 Mar 2025 11:40:21 +0100 Subject: [PATCH] Code polish --- main.go | 3 +++ release.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/main.go b/main.go index 337d72d..40becbe 100644 --- a/main.go +++ b/main.go @@ -200,6 +200,7 @@ func setupGit() error { } logger.Printf("Current working directory obtained: %s", cwd) + logger.Printf("Attempting to open git repository at %s", cwd) repo, err = git.PlainOpen(cwd) if err != nil { logger.Printf("No existing git repository found at %s, attempting to initialize a new git repository.", cwd) @@ -212,6 +213,7 @@ func setupGit() error { logger.Printf("Successfully opened existing git repository at %s", cwd) } + logger.Printf("Attempting to obtain worktree for repository at %s", cwd) worktree, err = repo.Worktree() if err != nil { return fmt.Errorf("failed to obtain worktree for repository at %s: %w", cwd, err) @@ -241,6 +243,7 @@ func expandFilePatterns(patterns []string) ([]string, error) { func cleanupGitFiles(files []string) error { for _, file := range files { + logger.Printf("Checking file: %s", file) status, err := worktree.Status() if err != nil { fmt.Fprintf(os.Stderr, "Error getting worktree status: %v\n", err) diff --git a/release.sh b/release.sh index 115e34b..f657e85 100644 --- a/release.sh +++ b/release.sh @@ -17,6 +17,7 @@ echo "Tag: $TAG" echo "Building the thing..." go build -o chef.exe . +go install . echo "Creating a release..." TOKEN="$GITEA_API_KEY"