Follows up #39 with a couple more fixes. I got too clever with the use
of shell variables, and it turned out that GOARCH / GOOS weren't
being read by the go build command because they weren't exported,
thereby resulting in the same binary being built four times.
Here, unwind some of the cleverness and prepend GOARCH/GOOS as would
be more commonly found. Although, we do use a subshell and export so
we can still reuse the variable names to produce an output filename.
Follows up #39 with a couple more fixes. I got too clever with the use of shell variables, and it turned out that
GOARCH
/GOOS
weren't being read by thego build
command because they weren't exported, thereby resulting in the same binary being built four times.Here, unwind some of the cleverness and prepend
GOARCH
/GOOS
as would be more commonly found. Although, we do use a subshell andexport
so we can still reuse the variable names to produce an output filename.