当我写出我想出的问题时,我将其
git lfs用于这些文件。添加此步骤后,我可以使用资源文件编译可执行文件。
steps:- checkout: self lfs: true
但是在以GOOS窗口为目标的构建之后,我必须删除这些文件,因为否则会出现错误:
/opt/hostedtoolcache/go/1.14.2/x64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1/usr/bin/ld: i386 architecture of input file `/tmp/go-link-782633042/000000.o' is incompatible with i386:x86-64 outputcollect2: error: ld returned 1 exit status
删除这些文件的步骤:
- task: PowerShell@2 displayName: Remove syso files inputs: targetType: 'inline' script: | Remove-Item $(System.DefaultWorkingDirectory)/cmd/AnalyseTool/*.syso
说明
这是v1文本指针的示例:
version https://git-lfs.github.com/spec/v1oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393size 12345(ending n)
来源:https :
//github.com/git-lfs/git-
lfs/blob/master/docs/spec.md
在 没有lfs支持的情况下 下载源代码时,将放置此文本文件,而不是 实际 文件。
因此很明显,该文件无法执行(错误的魔术数)或引用的bin文件格式错误(不是目标文件)。



