Eddie Hinkle



I've been working with Redux in Angular the last couple of days and I have to say I'm appreciating the unidirectional nature of it! Thinking of a couple more projects where I could use it.
Carla brought focus and hard-work to the ThreatConnect team. It was a pleasure working with her as she always brought solutions for problems that arose. She was always pleasant to work with both eager to help out others (including me) and never shy to ask for help when she ran into a problem herself. Carla fits the definition of a team player which can so often be rare in the world of software engineering. Her leaving will be a loss for our team, and it would be a pleasure to work on the same team as her in the future.

using git hooks for sanity

At my current job, we have two different build processes in grunt. The first is my development build which allows for easier debugging and the second is the production build that strips out code that isn't desired for the production servers. Unfortunately sometimes the development build runs just fine but the production build breaks. This leads to the potential mistake where I build something new using the development build but forget to check the production build before pushing my code into the shared git repo.

Nevertheless! I have a solution I've implemented and am documenting here for both myself and others.

I've added a pre-push git hook that runs a production build before pushing any branch to the server. What this means is I can continue to develop and commit as normal but when I try to push the code if it will break the production build it will break before the push allowing me to troubleshoot the issue, fix it and then do my push.

I've set this up in 2 ways, first I add a bash script called pre-push to (gitRepoDirectory)/.git/hooks. There is actually a big collection of potential hooks that you can choose from.

For me the script looks like this:

  1. !/bin/bash
  2. (npmProjectDirectory)/node_modules/grunt/bin/grunt --gruntfile (npmProjectDirectory)/Gruntfile.js build:prod

This works great using git on the command line. But seriously, who enjoys git cli? I use this great app called Git Tower. Unfortunately Git Tower can't find the node executable and thus it can't run my production build. This is an easy fix as detailed on their support page. After adding the environment.plist file from their support page, it works great!

No more accidentally breaking builds!

Pretty excited to have the last 3 months of my work rolled out today!
Please note: This site is in an active redesign. Some things might be a little off 🧐