include the git version in each file of the built site
This commit is contained in:
parent
a29add387b
commit
03e0fefc31
4 changed files with 10 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
_site/
|
_site/
|
||||||
|
_data/version.yml
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,8 @@
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||||
|
|
||||||
|
{% if site.data.version %}
|
||||||
|
<!-- site built from {{ site.data.version }} -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ git checkout master
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
|
|
||||||
|
|
||||||
|
./scripts/update-version
|
||||||
jekyll build --trace || exit 1
|
jekyll build --trace || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
4
scripts/update-version
Executable file
4
scripts/update-version
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git describe --dirty >| _data/version.yml
|
||||||
|
|
||||||
Loading…
Reference in a new issue