4 ms·
You can deploy an executable on a server just by typing GOOS=linux GOARCH=386 go build foo && scp foo user@server: That's a lot of time saved, especially
by sacado2 8y ago
You can deploy an executable on a server just by typing
GOOS=linux GOARCH=386 go build foo && scp foo user@server:
That's a lot of time saved, especially when you do it on a daily basis, and not something you can do as easily with virtualenv and such.
- meddlepal 8y agoYea I just do not buy it. How much time is saved? Is it writing an additional SSH command to extract the file or hitting the up-arrow on your keyboard to repeat the previously run command?
- sacado2 8y agoNot a lot, but when your test environment is on a remote server (because it replicates the production DB and you can't have that on your dev machine for security reasons), you tend to do it a lot. Add fast compilation to the mix, and you have a very productive workflow. `make && zip && scp && ssh unzip` is way slower than `go build && scp`
- joshuamorton 8y agoThere's also xar[1] (and similar things like par), which provide similar functionality in python in a managed way. Usage would be python foo/setup.py bdist_xar && scp foo/dist/foo.xar user@server if my understanding is correct. [1]: https://github.com/facebookincubator/xar https://github.com/facebookincubator/xar
- erik_seaberg 8y agoThen you don't have any metadata about what's installed nor a way to roll back. I'd rather have automation that runs "sudo yum update $MYPACKAGE".
- sacado2 8y agoGood point. We found ways to overcome these issues, but that's a tradeoff, for sure.