coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
553 stars 82 forks source link

Git versioned plugin #190

Closed equwal closed 3 years ago

equwal commented 4 years ago

Fully automated git versioning upon static content deployment. This is a drop-in replacement of the versioned plugin, which uses symlink cycling, and is superior to it since it is just a git repo. This is different from a gh-pages repo, in that it only assumes the free program git is available, and not the proprietary platform github.com

It is also possible to store the staging directory inside of the source directory, although this may result in slow commit times as git tries to deal with version controlling the whole site.

(git-versioned "~/path/to/src/dir" 'stage)

git-versioned needs to know where the source is so it can run git commands from that directory. Here all the commands implemented:

There currently isn't external support for custom commit messages at each invocation. This could be helpful to add for some.

Some rudimentary error handling is provided for the case of there being nothing to commit. Failure to push is left to be handled by the user.

Putting the coleslaw staging directory inside the git repository has the benefit of version controlling the whole site with git. This can be a problem though for large sites, especially with lots of binary data.

dertuxmalwieder commented 3 years ago

Good enough for a first try. Let's not sit this here untouched.