Skip to content

Commit 4c493cc

Browse files
committed
Merge branch 'master' of github.com:timvink/mkdocs-git-revision-date-localized-plugin
2 parents 9176cad + ae2a338 commit 4c493cc

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

.github/workflows/unittests.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest, macos-latest, windows-latest]
12-
python-version: [3.5, 3.6, 3.7]
12+
python-version: [3.6, 3.7, 3.8, 3.9]
1313
steps:
1414
- uses: actions/checkout@master
1515

@@ -18,23 +18,6 @@ jobs:
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

21-
# https://github.com/actions/virtual-environments/issues/294
22-
- name: Configure path to rc.exe for Python 3.5
23-
run: |
24-
function Invoke-VSDevEnvironment {
25-
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
26-
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
27-
$Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
28-
& "${env:COMSPEC}" /s /c "`"$Command`" -no_logo && set" | Foreach-Object {
29-
if ($_ -match '^([^=]+)=(.*)') {
30-
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
31-
}
32-
}
33-
}
34-
Invoke-VSDevEnvironment
35-
Get-Command rc.exe | Format-Table -AutoSize
36-
if: matrix.os == 'windows-latest' && matrix.python-version == '3.5'
37-
3821
- name: Install dependencies
3922
run: |
4023
pip3 install --upgrade pip
@@ -52,4 +35,5 @@ jobs:
5235
run: |
5336
git config --global user.name "Github Action"
5437
git config --global user.email "[email protected]"
55-
pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
38+
pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
39+

mkdocs_git_revision_date_localized_plugin/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def get_git_commit_timestamp(
112112
# A file can be created multiple times, through a file renamed.
113113
# Commits are ordered with most recent commit first
114114
# Get the oldest commit only
115-
commit_timestamp = commit_timestamp.split()[-1]
115+
if commit_timestamp != "":
116+
commit_timestamp = commit_timestamp.split()[-1]
116117
else:
117118
commit_timestamp = git.log(
118119
realpath, date="short", format="%at", n=1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="mkdocs-git-revision-date-localized-plugin",
15-
version="0.9.1",
15+
version="0.9.2",
1616
description="Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file.",
1717
long_description=LONG_DESCRIPTION,
1818
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)