🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.14 GitArchiveTask Create an archive of files from a named tree. Table C.15:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`The repository.n/aOne of these attributes is required.`remoterepo``String`The remote repository.n/a`treeish``String`The tree or commit to produce an archive for.n/aYes`output``String`Write the archive to file.n/aNo`prefix``String`Prepend prefix to each filename in the archive.n/aNo`format``String`Format of the resulting archive: tar or zip. If this option is not given, and the output file is specified, the format is inferred from the filename if possible (e.g. writing to "foo.zip" makes the output to be in the zip format). Otherwise the output format is tarn/aNo C.14.1 Example ``` <gitclone gitPath="${git-path}" singleBranch="true" repository="${repo.dir.resolved}" targetPath="${tmp.dir.resolved}/test" /> <gitarchive gitPath="${git-path}" repository="${tmp.dir.resolved}/test" treeish="HEAD" format="zip" output="${tmp.dir.resolved}/output.zip" /> ```