@@ -37,15 +37,15 @@ func build(baseDir string, releaseMode string, targetOS, targetArch string) {
3737 panic (err )
3838 }
3939
40- copyTo (filepath . Join ( ".." , " changelog.txt") , filepath .Join (baseDir , "changelog.txt" ))
40+ copyTo (" changelog.txt" , filepath .Join (baseDir , "changelog.txt" ))
4141
4242 if forMac {
4343 baseDir = filepath .Join (baseDir , "MasterPlan.app" , "Contents" , "MacOS" )
4444 }
4545
4646 // Copy the assets folder to the bin directory
4747
48- copyTo (filepath . Join ( ".." , " assets") , filepath .Join (baseDir , "assets" ))
48+ copyTo (" assets" , filepath .Join (baseDir , "assets" ))
4949
5050 fmt .Println ("<Assets copied.>" )
5151
@@ -96,9 +96,9 @@ func build(baseDir string, releaseMode string, targetOS, targetArch string) {
9696
9797 // Also note that I know it's weird that I'm joining the build script directory here because baseDir is already a folder up; this makes it so
9898 // bin is the running directory
99- c = exec .Command (`go` , `build` , `-C` , `..` , `- ldflags` , `-s -w -H windowsgui` , `-tags` , releaseMode , `-o` , filepath . Join ( "build_script" , outputFilepath ) , `.` )
99+ c = exec .Command (`go` , `build` , `-ldflags` , `-s -w -H windowsgui` , `-tags` , releaseMode , `-o` , outputFilepath , `.` )
100100 } else {
101- c = exec .Command (`go` , `build` , `-C` , `..` , `- ldflags` , `-s -w` , `-tags` , releaseMode , `-o` , filepath . Join ( "build_script" , outputFilepath ) , `.` )
101+ c = exec .Command (`go` , `build` , `-ldflags` , `-s -w` , `-tags` , releaseMode , `-o` , outputFilepath , `.` )
102102 }
103103
104104 fmt .Println ("<Building binary with args: " , c .Args , ".>" )
@@ -255,8 +255,8 @@ func main() {
255255 targetArch = * archFlag
256256 }
257257
258- build (filepath .Join (".." , " bin" , targetName + "-0.9-Release-" + targetArch ), "release" , targetName , targetArch )
259- build (filepath .Join (".." , " bin" , targetName + "-0.9-Demo-" + targetArch ), "demo" , targetName , targetArch )
258+ build (filepath .Join ("bin" , targetName + "-0.9-Release-" + targetArch ), "release" , targetName , targetArch )
259+ build (filepath .Join ("bin" , targetName + "-0.9-Demo-" + targetArch ), "demo" , targetName , targetArch )
260260 }
261261 if * compressMP {
262262 compress () // Compresses all built binary folders in the ./bin folder
0 commit comments