Put your (software) version in a file

I’ve started using my setver bash tool for easy semver versioning of components and projects. One of the design decisions I made back then, is that I would always have a VERSION.md version file in the root of my project. This file only contains the current version number. This version is also stored in the composer.json (PHP), package.json (JS) files and git tags, but I wanted a system that also works for my bash projects. In the end, it turns out that was a clever decision.

VERSION.md

Having the version number auto-updated in a file, without any parsing or cleanup needed, makes it easy to use it in other places, like in the footer of a website. This is how that works for some of my projects:

PHP projects:

using Smarty templates

using Laravel/Blade templates

Ruby projects

using Jekyll /Liquid templates

💬 idea 🏷 semver 🏷 software 🏷 development 🏷 github 🏷 git