this will for example allow me to have the following alias:
alias buildmain='export T=$(mktemp -d) && ALL_XC_OS="linux darwin windows" ALL_XC_ARCH="amd64" GOLDFLAGS="-s -w" ./scripts/build.sh && cd pkg/ && for dir in *; do zip -r "$dir.zip" $dir & ; done ; wait && mv *.zip $T/. && open $T'
that build only on 'main' platforms, so that I can share binaries easily.
- encapsulated code in functions to make it more readable
- validate presence of used tools/binaries (check if they're in PATH)
- more output
- FIX: make all uname/OSTYPE output to lowercase and check only for that
- refactored method name convert_path -> convertPathOnCygwin
- gave convert_path two arguments to make it more readable (Readability over tight code? I don't know what is required)
- some variable expansion now uses braces
This fixes building `packer` with Go >1.6. From https://golang.org/cmd/link/:
```
-X importpath.name=value
Set the value of the string variable in importpath named name to value.
Note that before Go 1.5 this option took two separate arguments.
Now it takes one argument split on the first = sign.
```
- Fix updatedeps reverting to master, which causes Travis CI to produce invalid results for pull-request builds. The makefile attempts to detect this change and checkout the correct branch if it happens.
- Clean up the code style and failure messaging.
- Add / update proxy targets for common workflows: default, deps, ci, release
1) /bin/sh is not /bin/bash, so build.sh needs to explictly use /bin/bash
2) dash's echo does not support \x, but it does support \0 (since dash is
/bin/sh, it gets used by Makefiles).