Back to the Future (with Software)

Angular 1.4 was released in May. It broke some of the angular-bootstrap directives. Apparently the angular-ui community is still addressing the problems, including the bootstrap alert, which was fixed a few days prior to this post.

The last release for angular-bootstrap was in May, so if you do a basic installation you're not getting any of the fixes. How to get the "nightly" release of the most current version?

Bower lets you install a version based on a github commit or a branch:1

bower install 'https://github.com/angular-ui/bootstrap.git#158d2676590'. 

If you simply do that, however, it installs it as bootstrap and overrwrites your bootstrap install. Instead I edited bower.json:

"angular-bootstrap": "https://github.com/angular-ui/bootstrap.git#158d2676590"

And I followed that with a quick bower_install. At that point, there's a git repository in bower_components. Don't bother fiddling with importing components from source. Go to the directory, type npm install, then grunt --help to see the available tasks. Notice grunt build and execute it, but first do grunt html2js. Bam, you've built a dist/ folder to use with all the fixes, although this wasn't completely intuitive and won't be hassle-free.2

Extend this to other software. Do you use iTerm2? Did you realize that as of this post, the nightly version is roughly 2,400 commits ahead of the latest release, with additional features such as allowing you to undo the closing of your tab? Plus you can contribute to testing new software.

You can run conveniently run beta or nightly versions side-by-side with your stable versions using homebrew-cask and the caskroom/versions tap: brew tap caskroom/versions followed by brew install iterm2-nightly.3

Don't expect the future software to fix all your problems or not introduce new ones, but I've only rarely experienced issues with cutting-edge software.

  1. I initially used git@github.com:angular-ui/bootstrap.git#master but the git/ssh dependency gave me fits when I went to deploy, as dokku builds from a Dockerfile inside a container. I also swapped master for a commit hash so the the build remains reproducible.

  2. Figuring out how to properly build a release is a case by case process. If there's a Dockerfile, that's often a good step. In my case, I ran into issues with just the build task and eventually looked at the angular-bootstrap development wiki page. In addition, when you do a fresh bower install, you'll have to do this again. So you'll have to figure out how to make that more convenient with some sort of frozen copy or automated task.

  3. The other versions will generally have a suffix distinguishing them, and if available they will show up if you search for the standard software.