Skip to content

Reference | Integration

Oleg edited this page May 30, 2017 · 2 revisions

Integrating

Prerequisites

All the tools you will need are residing in Nuget repository. See installing nuget on microsoft docs site.

Installing Xake

Issue the following commands to get Xake installed in tools folder.

nuget install Xake -excludeVersion -outputdirectory tools

Running script on Windows with Visual Studio and F# Tools

If you have installed Visual Studio with F# language support you will be able to run:

fsi.exe build.fsx

All the Visual Studio tools are available in PATH in "Developer Command Prompt for VS".

Using Mono on Windows/OSX/Linux

In case you have installed mono framework (a full one is required), you can run:

fsharpi build.fsx

See the instruction to install mono.

Using Fake

Fake command-line tool can be used to run xake script. You will still need mono or .NET runtime, but it's the easies way to run script on windows.

nuget install fake -excludeVersion -outputdirectory tools

Now you can run:

tools\fake\tools\fake.exe -nc build.fsx

-nc option which means "no cache" instructs FAKE to interpret build script instead of compiling it to dll.

Travis integration

Here's the excerpt from Xake project's .travis.yml:

language: csharp
solution: xake.sln
env: VER=$(if [[ "${TRAVIS_TAG:0:1}" == "v" ]]; then echo ${TRAVIS_TAG:1}; else echo 0.0.0; fi;)
install:
- mono .paket/paket.bootstrapper.exe
- mono .paket/paket.exe install
script:
- echo "module Xake.Const [<Literal>]  let internal Version = \"$VER.$TRAVIS_BUILD_NUMBER\"" > ./core/VersionInfo.fs
- fsharpi build.fsx -- build test nuget-pack

It uses paket (another great tool) to get packages from nuget, but you could still use nuget.

Clone this wiki locally