, , ,

At Shyp we don’t like to deploy to production after a certain hour on Fridays. This protects our on-call engineers from working to put out fires on Fridays and potentially throughout the weekend as well. I was curious how often we’d broken our own rules and why. Here’s a quick shell one-liner to check on that. For each production deploy we create a tagged release so I needed to filter just git tags.

There are probably more elegant ways to do this, but here’s what I came up with:

git for-each-ref --format="%(refname:short) %(taggerdate) %(subject) %(body)" refs/tags | grep Fri | awk '{print ""$5" "$0" "}' | awk '/^[1][2-9]\:/' | wc -l