有一个启动板 ppa,它每天都会交付新的包,这些包是从导入的 git 存储库作为源构建的。
我需要为给定的成功构建( example )找出相应的 git commit SHA-1 哈希。
有没有办法从 Launchpad 的网页本身中解决这个问题?
最佳答案
在该启动板 ppa 中列出的工件的日志中看到的唯一 Git 引用没有帮助。
例如:buildlog_ubuntu-xenial-amd64.paper-icon-theme_1.5.716-201806100126~daily~ubuntu16.04.1_BUILDING.txt.gz包括:
Buildd toolchain package versions:
launchpad-buildd_161 ...
git-build-recipe_0.3.4~git201611291343.dcee459~ubuntu16.04.1
git_1:2.7.4-0ubuntu1.4 ...
...
Homepage: https://github.com/snwh/paper-icon-theme
这些都无助于识别 right commit from
snwh/paper-icon-theme
.因此,您需要依赖可交付成果本身,其中可能包括提交引用。
例如见
paper-icon-theme.spec
其中有一行应该在构建时替换:# GitHub Stuff
%global commit0 40-CHARACTER-HASH-VALUE
如commit af069ae细节:
This is because files are named as
%{name}-%{commit0}.tar.gz
on download.
它指的是:
关于git - 如何找到针对哪个 git commit 构建了启动板包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50824058/