如何将Git仓库的子文件夹安装为Racket包?
例如,如果repo foo
有2个文件夹pkg
和etc
,如何告诉raco pkg install
忽略etc
?
答案 0 :(得分:3)
将?path=pkg
放在网址末尾:
https://github.com/USER/foo.git?path=pkg
(文件:查看Package Sources下的第5个项目符号或Git deployment下的第2个项目)
如果Git repo包含多个应该是包的一部分的文件夹(可能是pkg1
和pkg2
),请在回购中添加info.rkt
这样的文件:
#lang info
(define collection 'multi)
(define setup-collects '("pkg1" "pkg2"))
(define compile-omit-paths '("other"))
然后raco pkg install https://github.com/USER/foo.git
会忽略other
文件夹。