Alrighty, back to my reguarly schedule program: auto-merging versions. I left off at the point where I need to edit the file contianing the text of something like:

filler
1.0.0
bottom

Eash to extract the line using something like cat version | head -n 2 |tail -n 1. Perhaps I could use something similar for the recreation of the file? Probably be more like:

head -n 1 >preamble
tail -n 1 >epilog
echo $new_version >version

cat preamble version epilog >manifest

This feels really janky but would work for the test jig. An interesting artifact of my testing is a lack of a remote. This may become a hinderence in the future. The whole harness may need a more complicated setup to represent the reality of how these are intedned to work.

Supporting ReactNative on Travis CI interlude

The build system I’m supporting requires NVM on Travis CI to support ReactNative. This will be an interesting and hopefully shallow rabbit hole. The first interesting hit doesn’t look promising. Reading through the related thread it appears as though it’s not officially supported annoylingly enough. Looks like there are some community tested workarounds which will get Node Version Manager installed. First up on the docket to try: installing manually. I’ll modify it to install at ~/.nvm though.

The worst part of working with a busy CI system is the wait for the executors. Travis is’nt too bad but I feel like I’ve gotta wait a bit; much different than Jenkins on my workstation. Well, first attempt failed. Time to find out why. Interestingly the .nvm directory does exist. Hmm, perhaps I am chasing the wrong rabbit. Turns out the original reason why we thought ~/.nvm/nvm.sh didn’t exist was because we have an error sourcing the file. Fair. At least I got NVM to auto-update for us.

So the underlying problem is ~/.nvm/nvm.sh is failing to source. There are no messages or details regarding it’s underying problem. Reading the resulting message a little more carefully I realized the status code from the source is 3. Perhaps I can find the smoking gun in nvm.sh? That wasn’t really fruitful.

Searching the interwebs I found an issue related to using Homebrew. Slightly annoying. Looks like the authors are not interested in supporting zero-based exit codes. I’m not sure exactly what non-zero codes are used for within the script. I use the shell exit-on-error status (-e) to make error management easier. 9/10 times this is the correct behavior for me; when it’s not it’s a simple || operator and off we go. Simply pair set +e and set -e around the install code and you are good to go. NVM people seem fairly against it. Also related.

Back the merge…one step at a time.

I’ll eventually get this done. One step at a time I suppose. Perhaps tomorrow will be the day.