【问题标题】:FAKE FtpHelper UsageFAKE FtpHelper 用法
【发布时间】:2015-08-03 19:57:40
【问题描述】:

我正在尝试使用 F# FAKE 通过 FTP 将 zip 文件部署到 GoDaddy。 FAKE 中似乎有一个 FTPHelper,但我找不到任何有关如何创建目标以使用它的用法示例。

archived: http://fsharp.github.io/FAKE/apidocs/fake-ftphelper.html

我能想到的只是,

Target "Ftp" (fun _ ->
        |> Request uploadAFolder (fun p ->
        {p with
            server = ftp://10.100.200.300:21/;
            user = joey;
            pwd = somepassword1;
            srcPath = buildDir;
            rootPath = /httpdoc;
        })
)

我是一个仍在学习 F# 的 n00b,所以语法对我来说仍然有点陌生,似乎还没有任何使用它的教程,而且上面的内容似乎也不是很正确。有没有人更深入地向我展示 FtpHelper 的用法应该如何?

【问题讨论】:

    标签: deployment f# f#-fake f#-fake-4


    【解决方案1】:

    uploadAFolder 是一个函数定义为:

    val uploadAFolder: server:string -> user:string -> pwd:string -> srcPath:string -> rootDir:string -> unit
    

    该函数采用多个参数而不是单个记录。我相信它会被如下使用:

    Target "Ftp" (fun _ -> 
        uploadAFolder "ftp://10.100.200.300:21/" "joey" "somepassword1" "buildDir" "/httpdoc"
    )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-28
      • 1970-01-01
      • 2017-07-30
      • 2018-05-03
      • 2021-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多