【发布时间】:2015-04-20 21:35:38
【问题描述】:
我的构建脚本中有以下目标,当我将 nuget 提要作为包的目标时,它似乎可以工作,但我的组织使用人工制品并且有一个需要凭据的私有提要。
Target "RestorePackages" (fun _ ->
"./**/*.sln"
|> RestoreMSSolutionPackages (fun p ->
{ p with
Sources = "https://prd-artifactory.jfrog.com:8443/artifactory/api/nuget/some-private-feed" :: p.Sources
OutputPath = "./packages"
Retries = 4
ConfigFile = Some "./.nuget/nuget.config" })
)
我需要能够将用户名/密码传递给这个目标,这样我才能在 TeamCity 上运行它,传递要使用的凭据。
NuGet 文档指出您可以运行以下命令:
NuGet.exe Sources Add -Name <feedName> -Source <pathToPackageSource> -UserName xxx -Password <secret>
但我不确定如何在目标的构建脚本中使用它。
【问题讨论】:
-
我认为 TC 有预先认证的 url。 (其中包含url中的登录数据)
-
发生了一些变化,因为我找不到“ConfigFile”的属性fsharp.github.io/FAKE/apidocs/…
标签: build nuget artifactory f#-fake