From 221317be932f0c7ce578338f4133442f554554c9 Mon Sep 17 00:00:00 2001 From: partisan Date: Wed, 11 Sep 2024 13:19:06 +0200 Subject: [PATCH] fix windows robocopy --- sourceforge_config.json | 11 +++++------ spitfire/build.go | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sourceforge_config.json b/sourceforge_config.json index c98a8cf..c1250c3 100644 --- a/sourceforge_config.json +++ b/sourceforge_config.json @@ -1,7 +1,6 @@ { - "SFKeyPath": "~/.ssh/id_rsa.pub", - "SFUser": "internet-addict", - "SFHost": "web.sourceforge.net", - "SFProject": "spitfire-browser" - } - \ No newline at end of file + "SFKeyPath": "~/.ssh/id_rsa.pub", + "SFUser": "internet-addict", + "SFHost": "web.sourceforge.net", + "SFProject": "spitfire-browser" +} \ No newline at end of file diff --git a/spitfire/build.go b/spitfire/build.go index d14b60d..78a9efd 100644 --- a/spitfire/build.go +++ b/spitfire/build.go @@ -146,8 +146,8 @@ func UpdatePatches(patchesDir, patchesRepo, sourcePath string) { // Handle platform-specific rsync command fmt.Println("Copying files from patches directory to Firefox source directory...") if runtime.GOOS == "windows" { - // Use robocopy for Windows instead of rsync - if err := runCommand("robocopy", patchesDir, sourcePath, "/MIR"); err != nil { + // Use robocopy for Windows + if err := runCommand("robocopy", patchesDir, sourcePath, "*", "/E", "/XF", ".git"); err != nil { errors = append(errors, "Failed to copy files (Windows robocopy).") } } else { @@ -155,7 +155,7 @@ func UpdatePatches(patchesDir, patchesRepo, sourcePath string) { if err := runCommand("rsync", "-av", "--exclude=.git", patchesDir+"/", sourcePath+"/"); err != nil { errors = append(errors, "Failed to copy files (rsync).") } - } + } } // Function to configure Spitfire