My program has a log file that it outputs when it completes. I'd like for that output file to be named by the date when it was run.
I've tried setting a date variable, as well as adding it in line. This post says it works in line, but I'm having no luck with that method.
My current gitlab-ci.yml
variables:
MyProjectEXE: My\Project\myproject.exe
MSBuild: C:\Path\to\my\MSBuild.exe
Solution: C:\Path\to\my\project.sln
stages:
- build
- test
build:
stage: build
script: '"%MSBuild%" "%Solution%"'
test:
stage: test
script:
- '"%MSBuild%" "%Solution%"'
- '%MyProjectEXE%" --results C:\path\to\my\results\log-$(date + \"%Y%m%d-%H%M%S\").csv
The second script under test just outputs a file named
C:\path\to\my\results\log-$(date
I've tried creating a variable that holds the date at the top, and putting it there, and I've tried just about every form of quotes around that log file name.