diff options
author | Dominique Louis <savagesoftware@gmail.com> | 2018-02-01 20:26:25 +0300 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2018-02-02 18:11:58 +0300 |
commit | fa4b2bfedda29e125efdfcd6715ea8ce8bdbbfcf (patch) | |
tree | fa6fa52b0e19145a744a1b18d99e843afb3500a9 /bot-provisioning | |
parent | 5b73d3d0bb91b3f5434ea2e31e04edb9402afb33 (diff) |
[build] Add Provisionator so we can build for references to ValidateMenuItem on Mac
Diffstat (limited to 'bot-provisioning')
-rw-r--r-- | bot-provisioning/dependencies.csx | 5 | ||||
-rwxr-xr-x | bot-provisioning/provisionator-bootstrap.sh | 50 |
2 files changed, 55 insertions, 0 deletions
diff --git a/bot-provisioning/dependencies.csx b/bot-provisioning/dependencies.csx new file mode 100644 index 0000000..119bd07 --- /dev/null +++ b/bot-provisioning/dependencies.csx @@ -0,0 +1,5 @@ +#r "_provisionator/provisionator.dll" + +using static Xamarin.Provisioning.ProvisioningScript; + +Item ("https://bosstoragemirror.azureedge.net/wrench/macios-mac-master/90/90a2ac27b12c460aa021198e1c913b38a12937af/xamarin.mac-4.3.0.84.pkg"); diff --git a/bot-provisioning/provisionator-bootstrap.sh b/bot-provisioning/provisionator-bootstrap.sh new file mode 100755 index 0000000..520e2eb --- /dev/null +++ b/bot-provisioning/provisionator-bootstrap.sh @@ -0,0 +1,50 @@ +#!/bin/bash -e +# +# Remove the following GUID if you do not wish for this script self-update: +# D6F71FB5-F2A7-4A62-86D3-10DFE08301CC +# https://github.com/xamarin/provisionator + +function selfdir { (cd "$(dirname "$1")"; echo "$PWD"; ) } + +selfdir=$(selfdir "$0") + +channel="${PROVISIONATOR_CHANNEL:-latest}" + +base_url="https://bosstoragemirror.blob.core.windows.net/provisionator/664bd334021e3102cdef1af66c4fc9f1b2ecd2a21b47419e80d08da1f6c61c2a/${channel}" +latest_version_url="${base_url}/version" + +archive_name="provisionator.osx.10.11-x64.zip" +archive_path="${selfdir}/${archive_name}" +archive_extract_path="${selfdir}/_provisionator" +archive_url="${base_url}/${archive_name}" +binary_path="${archive_extract_path}/provisionator" + +set +e +latest_version="$(curl -fsL "${latest_version_url}")" +if [ $? != 0 ]; then + echo "Unable to determine latest version from ${latest_version_url}" + exit 1 +fi +set -e + +function update_in_place { + echo "Downloading Provisionator $latest_version..." + local progress_type="-s" + tty -s && progress_type="-#" + curl -f $progress_type -o "$archive_path" "$archive_url" + rm -rf "$archive_extract_path" + unzip -q -o -d "$archive_extract_path" "$archive_path" + rm -f "$archive_path" +} + +if [ -f "$binary_path" ]; then + chmod +x "$binary_path" + current_version="$("$binary_path" -version 2>&1 || true)" + if [ "$latest_version" != "$current_version" ]; then + update_in_place + fi +else + update_in_place +fi + +exec "$binary_path" "$@" |