[英]Problem with sha pointer ["error": "--from is not a valid sha pointer: \"origin/master\"",]
I want to deploy only changed files (according to documentation: https://github.com/scolladon/sfdx-git-delta )我只想部署更改的文件(根据文档: https://github.com/scolladon/sfdx-git-delta )
I add to bitbucket-pipelines.yml:我添加到 bitbucket-pipelines.yml:
- mkdir changed-sources
- git status
- git diff YMLEdit origin/master
- sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta
without git diff i receive an error:没有 git 差异我收到一个错误:
sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta
{
"error": "--from is not a valid sha pointer: \"origin/master\"",
"output": "changed-sources/",
"success": false,
"warnings": []
} }
When I add git diff i receive this:当我添加 git diff 我收到这个:
+ git diff YMLEdit origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Any ideas?有任何想法吗?
I tried using diffrent docker image I tried using git fetch我尝试使用不同的 docker 图像我尝试使用 git 获取
Bitbucket is probably running your pipeline in a shallow, single-branch clone, so that there is no origin/master. Bitbucket 可能在一个浅的单分支克隆中运行您的管道,因此没有源/主。 Check any appropriate bitbucket documentation to find out how to direct the pipelne to use a full clone检查任何适当的 bitbucket 文档以了解如何指导管道使用完整克隆
Solution, that worked for me: according to torek suggestion and documntation: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/ I add to bitbucket-pipelines.yml:解决方案,对我有用:根据 torek 的建议和文档: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/我添加到 bitbucket-pipelines.yml:
clone:克隆:
depth: full深度:满
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.