FAKE - F# Make - A DSL for build tasks and more FAKE
6.1.3

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Rsync Module

Helpers for running rsync tool

Under windows you will need to add it yourself to your system or use something like cygwin/babun

Example


 let result =
          Rsync.exec
             (Rsync.Options.WithActions
                  [
                      Rsync.Compress
                      Rsync.Archive
                      Rsync.Verbose
                      Rsync.NoOption Rsync.Perms
                      Rsync.Delete
                      Rsync.Exclude ".keep"
                  ]
              >> Rsync.Options.WithSources
                  [ FleetMapping.server </> "build"
                    FleetMapping.server </> "package.json"
                    FleetMapping.server </> "yarn.lock" ]
              >> Rsync.Options.WithDestination "[email protected]:deploy")
              ""
     if not result.OK then failwithf "Rsync failed with code %i" result.ExitCode

Types

Type Description

Action

Options

The rsync command options

Functions and values

Function or value Description

Rsync.exec buildOptions args

Full Usage: Rsync.exec buildOptions args

Parameters:
    buildOptions : Options -> Options - A function to configure actions/options, sources, and destination.
    args : string - String arguments to pass to rsync

Returns: ProcessResult

Run rsync tool with the provided actions/options list of directories/files sources to given the destination.

buildOptions : Options -> Options

A function to configure actions/options, sources, and destination.

args : string

String arguments to pass to rsync

Returns: ProcessResult
Example


 let result =
          Rsync.exec
             (Rsync.Options.WithActions [ Rsync.Compress ]
              >> Rsync.Options.WithSources [ FleetMapping.server </> "build" ]
              >> Rsync.Options.WithDestination "[email protected]:deploy")
              ""
     if not result.OK then failwithf "Rsync failed with code %i" result.ExitCode