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
//Environment variables | |
let version = "1.0.0" | |
let build = environVarOrDefault "BUILD_NUMBER" "1" | |
let versionNumber = (version + "." + build) |
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
let Exec command args = | |
let result = Shell.Exec(command, args) | |
if result <> 0 then failwithf "%s exited with error %d" command result |
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
let UpdatePlist shortVersion version project = | |
let info = Path.Combine(project, "Info.plist") | |
Exec "/usr/libexec/PlistBuddy" ("-c 'Set :CFBundleShortVersionString " + shortVersion + "' " + info) | |
Exec "/usr/libexec/PlistBuddy" ("-c 'Set :CFBundleVersion " + version + "' " + info) |
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
let UpdateManifest version build project = | |
let path = (project + "/Properties/AndroidManifest.xml") | |
let ns = Seq.singleton(("android", "http://schemas.android.com/apk/res/android")) | |
XmlPokeNS path ns "manifest/@android:versionName" (version + "." + build) | |
XmlPokeNS path ns "manifest/@android:versionCode" build |
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
<Import Project="..\packages\Readify.Xamarin.MSBuild.WindowsPhone.1.1.0\build\Readify.Xamarin.MSBuild.WindowsPhone.targets" Condition="Exists('..\packages\Readify.Xamarin.MSBuild.WindowsPhone.1.1.0\build\Readify.Xamarin.MSBuild.WindowsPhone.targets')" /> |
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
let HockeyPath = | |
if isUnix then "/usr/local/bin/puck" else @"C:\Program Files (x86)\HockeyApp\Hoch.exe" | |
let HockeyArgs = | |
if isUnix then "-submit=auto -app_id={1} -api_token={2} {0}" else "{0} /app_id {1} /version {3} /notes \"\"" | |
let Hockey file appId apiToken version = | |
Exec HockeyPath (String.Format(HockeyArgs, file, appId, apiToken, version)) |
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
let Raygun appId token dSym = | |
let dSymZipped = dSym + ".zip" | |
Exec "zip" ("-y -r " + dSymZipped + " " + dSym) | |
Exec "curl" ("-H 'Host: app.raygun.io' -H 'Authorization: Basic " + token + "' --form 'DsymFile=@" + dSymZipped + "' https://app.raygun.io/dashboard/"+ appId + "/settings/symbols") |
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
let RunNUnitTests dllPath = | |
Exec ".nuget/NuGet.exe" "install NUnit.Runners" | |
!! dllPath |> NUnit (fun p -> p) |
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
"C:\Program Files (x86)\Unity\Editor\Unity.exe" -quit -batchmode -logFile -projectPath path\to\YourProject -executeMethod BuildScript.Android |
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
public class BuildScript | |
{ | |
static void Android() | |
{ | |
BuildPipeline.BuildPlayer(GetScenes(), "your.apk", BuildTarget.Android, BuildOptions.None); | |
} | |
static string[] GetScenes() | |
{ | |
return EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray(); |