MagicLike / YOURLS-plugin-gitversion

YOURLS plugin: Adds version information from git repository into the admin area | 🚧 CURRENTLY BROKEN 🚧

Repository from Github https://github.comMagicLike/YOURLS-plugin-gitversionRepository from Github https://github.comMagicLike/YOURLS-plugin-gitversion

YOURLS-gitversion plugin

If you are running YOURLS from a release tarball this plugin is nothing for you.

But if you are following the YOURLS repository on GitHub to stay on the edge of the latest commits and improvements, maybe this plugin is for you!

This plugin adds version information from the git repository into the footer of the admin page. The version information is derived from the output of git describe --long --tags.

Before:

Powered by YOURLS v 1.7.1 – 3 queries

After:

Powered by YOURLS v 1.7.1 – 3 queries
v 1.7-git-80.37f54c7 (remotes/upstream/master)

Meaning the last commit in your repository is named 37f54c7 which is 80 commits in the future of version tag 1.7. – Now, how cool is that!? ;)

Installation

Git Hooks

Currently, the plugin does not execute git describe directly, but depends on a version file that is being updated on each checkout or commit by a Git hook. Some simple hook files are included in the git-hooks/ directory. Just copy them into .git/hooks/ of your YOURLS installation and make them executable (on POSIX like systems: chmod +x .git/hooks/post-{commit,checkout}).

Plugin installation

Clone this repository to the YOURLS plugin directory user/plugins/ or make a new directory called gitversion in the YOURLS plugin directory user/plugins/ and copy the plugin.php into your newly created directory. (as a result the YOURLS-directory user/plugins/gitversion should show the file plugin.php).

Go to the admin panel and activate the plugin Git Version.

Please note, the version file will be written on the next checkout or commit. Before that, the plugin will simply tell you that it is missing the file.

About

YOURLS plugin: Adds version information from git repository into the admin area | 🚧 CURRENTLY BROKEN 🚧


Languages

Language:PHP 91.3%Language:Shell 8.7%