关于如何使用 github 存储库 HEAD 创建 Portfile 并从 origin/master 或标签拉取的文档非常少。
需要校验和吗?如果是的话,如何计算?
如何从不同的存储库/ 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
最佳答案
how to pull a PR from a different repo/fork?
如果您有 PR 的 ID,如“Checking out pull requests locally”中所述,则获取 URL 将为
git fetch origin pull/ID/head:BRANCHNAME
应用于 porfile, with fetch.type
set to git
,你可以尝试作为分支名称
git.branch origin/pull/ID/head
Note that while you can set
fetch.type git
andgit.branch origin/master
, this is not supported by MacPorts.
It's fine for development, but when trying to get a Portfile included in MacPorts, we expect that a certain version of the Portfile will always produce the same result, regardless of when you install it.For git submodules, add
post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init" }
together withfetch.type git
.
关于github - 使用 HEAD 和/或 origin/master 从 git repo 创建 Portfile?如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47119988/