Bash, is the Git working directory dirty?

This week at $CURRENT_JOB I was tasked to write a GitHub Actions workflow that would update our lockfile and open a PR with the new version.

At first it seemed very simple, but I have to relearn Bash every time I write it. Fortunately, the solution was easier than we thought after some trial and errors:

if [ -z "$(git status --porcelain)" ]; then
    echo "no changes were found"
    # exits the pipeline without failing
    exit 0
    echo "changes were found"
    # do something with the changes

Articles from blogs I follow around the net

Simpler encapsulation with immutability

A worked example. I've noticed that many software organizations struggle with encapsulation with 'bigger' problems. It may be understandable and easily applicable to define a NaturalNumber type or ensure that a minim…

via ploeh blog June 12, 2024

Update on our infrastructure plans

Now that Drew has provided an update on the general state of SourceHut, I would like to follow up with one focusing on our infrastructure. Much has happened under the hood, a lot has not happened, and plans come and go as reality changes its mind every now a…

via Blogs on Sourcehut June 12, 2024

OpenBSD extreme privacy setup

# Introduction This blog post explains how to configure an OpenBSD workstation with extreme privacy in mind. This is an attempt to turn OpenBSD into a Whonix or Tails alternative, although if you really need that level of privacy, use a system from this…

via Solene'% June 10, 2024

Generated by openring