使用HEAD和/或origin / master从git repo创建Portfile?如何?

时间:2017-11-05 09:21:30

标签: github tcl macports

关于如何使用github repo HEAD创建Portfile以及从origin / master或tag中提取文档的文档很少。

需要校验和吗?如果是的话,如何计算?

如何从不同的repo / fork中提取PR?

例如

PortSystem          1.0

name                zimg
version             1.0
categories          multimedia

maintainers         nomaintainer

description         Colorspaces: SMPTE-C (NTSC)
homepage            https://github.com/sekrit-twc/zimg
distname            ${name}

fetch.type          git
git.url             https://github.com/sekrit-twc/zimg.git
git.branch          origin/master

1 个答案:

答案 0 :(得分:1)

  

如何从不同的repo / fork中提取PR?

如果您拥有PR的ID,如" Checking out pull requests locally"中所述,则提取网址将为

git fetch origin pull/ID/head:BRANCHNAME

应用于porfile, with fetch.type set to git,您可以尝试作为分支名称

git.branch          origin/pull/ID/head

neverpanic添加了the comments

  

请注意,虽然您可以设置fetch.type gitgit.branch origin/master,但MacPorts不支持此功能。
  它适用于开发,但是当尝试获取MacPorts中包含的Portfile时,我们希望某个版本的Portfile始终会产生相同的结果,无论您何时安装它。

     

对于git子模块,请将post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init" }fetch.type git一起添加。