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

标签 github tcl macports

关于如何使用 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

neverpanic添加the comments :

Note that while you can set fetch.type git and git.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 with fetch.type git.

关于github - 使用 HEAD 和/或 origin/master 从 git repo 创建 Portfile?如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47119988/

相关文章:

tcl - 设置 TCL 以访问 tcl 库

tcl - 有没有好的基于浏览器的沙箱来练习 TCL?

python - Conda 和 Macports X11 安装 dlib 时发生冲突

cmake - 使用 MacPorts 安装 cmake 时出现问题

reactjs - 如何将 create-react-app 部署到 Web 主机(例如 Siteground)?

r - Github Action 因 R CMD 检查而失败,使用旧提交?

smtp - TCL 电子邮件脚本未在 Activestate TCL 中传送

git - 在 git bash 中创建一个新文件

git - SCM 同步不工作

apache2 - MacPorts Apache2 在启动时停止启动