企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 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" /> ```