Bro*_*ski 5 git yaml environment-variables appveyor
我试图在AppVeyor成功构建之后标记存储库.我已阅读以下资源:
但我不知道如何在AppVeyor环境变量中替换.这是我正在使用的Yaml:
on_success:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git tag -a release/$($env:APPVEYOR_BUILD_VERSION)
- git push origin release/$($env:APPVEYOR_BUILD_VERSION)
Run Code Online (Sandbox Code Playgroud)
这会导致AppVeyor构建日志中出现以下错误
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
git tag -a release/$($env:APPVEYOR_BUILD_VERSION)
fatal: 'release/$($env:APPVEYOR_BUILD_VERSION)' is not a valid tag name.
Command exited with code 128
Run Code Online (Sandbox Code Playgroud)
鉴于powershell Add-Content行应该按照示例工作,你应该如何将变量替换为git命令?
小智 7
应该:
- git tag -a release/%APPVEYOR_BUILD_VERSION%
- git push origin release/%APPVEYOR_BUILD_VERSION%
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
753 次 |
最近记录: |