From 11eea6a82cbfdde40ec1457c6ea080da4da6b7dc Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 31 Oct 2025 20:13:32 +0200 Subject: feat: implement amp AI tool support and replace Taskfile with Mage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add amp as default AI tool for release notes and showcase generation - Fallback chain: amp → hexai → claude → aichat - Replace Taskfile.yaml with magefile.go for build automation - Update all documentation (README.md, AGENTS.md, doc/development.md) - Update version to 0.10.0 Amp-Thread-ID: https://ampcode.com/threads/T-735ba1e2-0255-4b43-8ed1-6c0d2f78301b Co-authored-by: Amp --- internal/sync/git_operations.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'internal/sync/git_operations.go') diff --git a/internal/sync/git_operations.go b/internal/sync/git_operations.go index efa27f5..0bd698e 100644 --- a/internal/sync/git_operations.go +++ b/internal/sync/git_operations.go @@ -242,24 +242,24 @@ func createSSHBareRepository(sshHost, repoPath string) error { if len(parts) != 2 { return fmt.Errorf("invalid SSH host format: %s", sshHost) } - + userHost := parts[0] basePath := parts[1] - + // Full path to the repository fullRepoPath := fmt.Sprintf("%s/%s.git", basePath, repoPath) - + fmt.Printf("Creating bare repository at %s:%s\n", userHost, fullRepoPath) - + // Create the repository directory and initialize as bare commands := fmt.Sprintf("mkdir -p %s && cd %s && git init --bare", fullRepoPath, fullRepoPath) cmd := exec.Command("ssh", userHost, commands) output, err := cmd.CombinedOutput() - + if err != nil { return fmt.Errorf("failed to create bare repository: %w\n%s", err, string(output)) } - + fmt.Printf("Successfully created bare repository at %s:%s\n", userHost, fullRepoPath) return nil } @@ -280,18 +280,18 @@ func pushBranchWithBackupSupport(remoteName, branch string, remoteHasBranch bool if err != nil { return fmt.Errorf("failed to get remote URL: %w", err) } - + // Extract repo name from URL repoName := extractRepoName(remoteURL) if repoName == "" { return fmt.Errorf("failed to extract repository name from URL: %s", remoteURL) } - + // Create the bare repository if err := createSSHBareRepository(org.Host, repoName); err != nil { return fmt.Errorf("failed to create SSH repository: %w", err) } - + // Try pushing again cmd = exec.Command("git", "push", remoteName, branch, "--tags") if err := cmd.Run(); err != nil { @@ -300,7 +300,7 @@ func pushBranchWithBackupSupport(remoteName, branch string, remoteHasBranch bool fmt.Printf(" Successfully pushed to newly created backup repository\n") return nil } - + fmt.Printf(" Note: Remote repository %s does not exist - must be created manually\n", remoteName) fmt.Printf(" Skipping push to %s\n", remoteName) return nil // Not an error, just skip @@ -341,7 +341,7 @@ func getRemoteURL(remoteName string) (string, error) { func extractRepoName(url string) string { // Remove .git suffix if present url = strings.TrimSuffix(url, ".git") - + // Extract the last component of the path parts := strings.Split(url, "/") if len(parts) > 0 { -- cgit v1.2.3