我正在使用TeamCity构建并部署到我们的演示站点。我们有一个名为HTML Demo Site的配置,其中一个构建步骤是使用NAnt将HTML部署到站点。
构建文件已定义目标:
<target name="deploy-html" description="Deploys the HTML to the demo server">
<echo message="Deploying HTML to the demo server..."/>
<copy todir="\\<server>\<dir>\<client>" includeemptydirs="true" overwrite="true">
<fileset basedir="..\html\_master">
<include name="**\*"/>
<exclude name="node_modules\**"/>
</fileset>
</copy>
</target>
每次我在TeamCity上运行构建时,都会出现此错误:
C:\tc\w\9149e011dfa8657d\build_scripts\website.build(27,14):
[NAnt output] Error creating FileSet.
[NAnt output] The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
所以我尝试在PowerShell上运行以获取超过最大长度的文件列表:
Get-ChildItem -Recurse | Where-Object {$_.FullName.Length -gt 248}
但是返回的唯一文件是node_modules目录下的文件。但是在构建文件中,它被排除在外。所以我不确定还能在哪儿看?有什么想法吗?
答案 0 :(得分:3)
你可以尝试一些事情:
<exec>
任务robocopy /mir
name="node_modules\**\*"
或name="**\node_modules\**"
或类似答案 1 :(得分:2)
删除首先对我有用 - 但是内置的nant删除任务也有问题所以我不得不使用jQuery( ".video-player" ).each(function( index ) {
console.log( index + ": " + jQuery(this).attr('data-id') );
});
控制台命令
rmdir