mbland / go-script-bash

Framework for writing modular, discoverable, testable Bash scripts
ISC License
96 stars 16 forks source link

Download release file instead of cloning repo in go template #179

Closed juansaavedrauy closed 7 years ago

juansaavedrauy commented 7 years ago

It drops git clone as a mean of getting a release for go-script-bash in favor of a download of the release file from github through curl.

It uses tar to extract the downloaded file. Tested in bsdtar and gnutar.

Please review the error handling for the pipe, I'm not prolific in bash scripting and I found it to be a non robust checking.

juansaavedrauy commented 7 years ago

I will look at the comments and submit the changes. They all look good. Would you let me know if I should change something in the TravisCI file for the checks to work?

mbland commented 7 years ago

I'm going to be either busy or on a flight between now and Saturday, and may not be able to dive back in until Monday (thanks to jet lag and reuniting with friends after a month in Europe), so apologies in advance for that.

Also due to my work and travel schedule, I still haven't had a chance to look into what's going on with Travis, so feel free to experiment if you like! If not, no worries; I'll take a look as soon as I can.

mbland commented 7 years ago

Hey, sorry it's been a while...finally got some time to dig into the failure. When SimonKagstrom/kcov#211 gets merged, I'll kick off a new build and review.

juansaavedrauy commented 7 years ago

I've updated the code as you suggested. In the end, I could not use process substitution for the tar command. Nevertheless, I've managed to use pipefail and restore it afterwards.

I still believe that it looks a bit clumsy, so feel free to come back with more changes and corrections.

Thanks.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 94.212% when pulling 6c207f29170ce076d179da9bf340086bb5e43154 on elpaquete:go_template_curl into 9319b70bfa923a3eaefca6e9fbdbe92ba575f3a6 on mbland:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 94.212% when pulling 167e05273cb82fb75006f8802ba073cab4d0b702 on elpaquete:go_template_curl into 9319b70bfa923a3eaefca6e9fbdbe92ba575f3a6 on mbland:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.05%) to 94.68% when pulling dad4b54c3abe22e6c93da9685f0c9ed8bb20a1af on elpaquete:go_template_curl into 9319b70bfa923a3eaefca6e9fbdbe92ba575f3a6 on mbland:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.05%) to 94.68% when pulling 92b064cd331db9b59851137de8c8a778db0c079a on elpaquete:go_template_curl into 9319b70bfa923a3eaefca6e9fbdbe92ba575f3a6 on mbland:master.

mbland commented 7 years ago

Wow, I can't believe how long I've let this sit... Apologies.

I've pulled your branch locally and am looking at it right now. I'm anticipating I'll end up merging your branch, then I'll create a new PR to push a commit with minor tweaks, and then release v1.6.0 so it's officially available.

FWIW, I've been heads-down on other projects (devs-setup and custom-links), and have come up with some more stuff I want to push into v1.7.0 soon. One of the most fun things is more Bats helpers to test server or other processes that need to run in the background for a bit.