-
Notifications
You must be signed in to change notification settings - Fork 663
Closed
Description
Describe the bug
My gitlab pipelines started failing after the 5.6.9 release -- failing with
The system cannot open the device or file specified. : 'Global\.'
My gitlab pipeline job looks like:
version:
stage: version
cache: {}
image:
name: gittools/gitversion:latest
entrypoint: [""]
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- gitversion.properties
script:
- /tools/dotnet-gitversion . /output buildserver
- cat gitversion.propertieslater jobs in the pipeline depend on the version job and import the env vars from gitversion.properties.
Expected Behavior
With 5.6.8 and earlier, using '.' as the path works:
❯ docker run --rm -v "$(pwd):/repo" -it --entrypoint /bin/bash gittools/gitversion:5.6.8
root@7e5bc4da4ee2:/tools# cd /repo
root@7e5bc4da4ee2:/repo# /tools/dotnet-gitversion . /output json
{
"Major": 3,
"Minor": 3,
"Patch": 1,Actual Behavior
With 5.6.9, '.' as the path fails:
❯ docker run --rm -v "$(pwd):/repo" -it --entrypoint /bin/bash gittools/gitversion:5.6.9
root@b4e01d80db52:/tools# cd /repo
root@b4e01d80db52:/repo# /tools/dotnet-gitversion . /output json
The system cannot open the device or file specified. : 'Global\.'
# however, I can use $(pwd) instead and it's happy
root@b4e01d80db52:/repo# /tools/dotnet-gitversion $(pwd) /output json
{
"Major": 3,
"Minor": 3,
"Patch": 1,Possible Fix
to work-around it on gitlab, I'm probably going to replace my pipeline job definition with
- /tools/dotnet-gitversion $(pwd) /output buildserver
or
- /tools/dotnet-gitversion ${CI_PROJECT _PATH} /output buildserver