Created
October 6, 2016 15:02
-
-
Save aspnetde/98f973dbee73ccf15ac4022a008c70cf to your computer and use it in GitHub Desktop.
FAKE Failing Test (with PlistBuddy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "tools/FAKE/FakeLib.dll" | |
open Fake | |
open System | |
open System.IO | |
let Exec command args = | |
let result = Shell.Exec(command, args) | |
if result <> 0 then failwithf "%s exited with error %d" command result | |
let ExecutePlistBuddy key value path = | |
Exec "/usr/libexec/PlistBuddy" ("-c 'Set :" + key + " " + value + "' " + path) | |
Target "failing-test" (fun _ -> | |
ExecutePlistBuddy "CFBundleIdentifier" "test1" "Some/Info.plist" | |
// Remove the next line, and we're good to go. | |
ExecutePlistBuddy "CFBundleDisplayName" "test2" "Some/Info.plist" | |
) | |
RunTargetOrDefault "failing-test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment