Skip to content

Commit

Permalink
Include build date / git rev somewhere we can scrape
Browse files Browse the repository at this point in the history
Change-Id: Ie15b96f633883f443f80e7335a1365a1a5687d1d
  • Loading branch information
zifnab06 committed Nov 18, 2021
1 parent 608850e commit 4f4a41a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _plugins/jekyll-version.rb
@@ -0,0 +1,12 @@
module Jekyll
class VersionGenerator < Generator
priority :high
safe true

def generate(site)
site.data["version"] = {}
site.data["version"]["git"] = %x( git describe --always --dirty).strip
site.data["version"]["build_date"] = %x( date +%s ).strip
end
end
end
9 changes: 9 additions & 0 deletions version.json
@@ -0,0 +1,9 @@
---
title: version
layout: none
search: exclude
---
{
"git": "{{site.data.version.git}}",
"build_date": "{{site.data.version.build_date}}"
}

0 comments on commit 4f4a41a

Please sign in to comment.