@@ -27,13 +27,24 @@ jobs:
2727 steps :
2828 - uses : actions/checkout@v2
2929
30- - name : Get history and tags for SCM versioning to work
30+ - name : Get history and tags for SCM versioning to work (Unix)
31+ if : runner.os != 'Windows'
3132 run : |
3233 if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
3334 git fetch --prune --unshallow
3435 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3536 fi
3637
38+ - name : Get history and tags for SCM versioning to work (Windows)
39+ if : runner.os == 'Windows'
40+ run : |
41+ $value = git rev-parse --is-shallow-repository
42+ if ( $value -eq "true" )
43+ {
44+ git fetch --prune --unshallow
45+ git fetch --depth=1 origin +refs/tags/*:refs/tags/*
46+ }
47+
3748 - name : Setup Python ${{ matrix.python }}
3849 uses : actions/setup-python@v2
3950 with :
@@ -333,12 +344,14 @@ jobs:
333344 steps :
334345 - uses : actions/checkout@v2
335346
336- - name : Get history and tags for SCM versioning to work
347+ - name : Get history and tags for SCM versioning to work (Windows)
337348 run : |
338- if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
349+ $value = git rev-parse --is-shallow-repository
350+ if ( $value -eq "true" )
351+ {
339352 git fetch --prune --unshallow
340353 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
341- fi
354+ }
342355
343356 - name : Get pip cache dir
344357 id : pip-cache
0 commit comments