A firefighter doesn't tie his boots while he's holding the hose. A president doesn't write her speech while she's orating. A Winnipeg Jet doesn't sharpen his skates while splitting the defense. Why the heck was I fiddling around with the S3 management console after I completed a post? Here's a story of the difficulties and triumphs experienced while making sure I don't get slowed down while delivering my content.
AdamKrieger.ca was originally written using my a personally-developed static site framework: Fable. I was even writing the markdown parser, so developing content was sometimes mixed up with the creation process. If I wanted to include a list in my post, I had to program list parsing into Fable. While sometimes slow, this was really fun, and it taught me a lot about what my product needed in order to be a viable option.
Today, AdamKrieger.ca is generated with Hugo. I switched because the availability of something complete (pagination, full markdown, themes) combined with the friction of being both producer and consumer outweighed the learning benefits. There's a bit of a comment on the Agile software process in there, but I'm intentionally leaving it alone for now.
Brief list of steps to roll out a new post after Hugo, but before Shove:
So that seems like no big deal, but last week after I hit a snag. After deleting the contents of the bucket, there was no easy way to copy the files back in. I don't know if Amazon removed the click-and-drag UI, or if I simply couldn't find it, but there I was with a finished product and step 6 had become this:
Holy crap. That went from a two minute process to a fifteen minute one that was extremely error-prone. That had to be fixed, and quickly. Luckily, AWS has a few SDKs out there. Since Hugo is written in Go, I decided to use that one. A few tutorials, forum searches, and head-scratchers later, I'd developed 0.1.0 of Shove.
Here are some things I learned, neat Go libs, and tips and tricks.
Starting from scratch with this CLI tool allowed Shove to grow organically. Defaults became options, and then global options. Procedures moved from root operations to nested commands. I highly recommend this one. Check out the main func of shove.go for examples. Also has great documentation.
This is an array of functions for printing ANSI-escape colored text to terminal output. Very easy to use. I had a long list of files, and needed to write 'Skipped' in red when that file was getting ignored. It has the power to use standard printf forms.
If delivery is the most painful, error prone, or time consuming part of your process, does it have to be? Most of the software projects I've worked with deploy to the same place every time. Even the ones that don't have some pretty standard behaviours. Iron those wrinkles out. Treat your deployment process like a product.
That's all for now. If you have any questions about how I did something or if this utility is three lines of code away from working for you, let me know.