Powershell script to create secrets.txt and MapKeys.cs

This commit is contained in:
E.Z. Hart 2016-03-22 17:47:35 -06:00
Родитель c2f06e6c24
Коммит 65e8ce6f66
1 изменённых файлов: 22 добавлений и 0 удалений

22
Setup.ps1 Normal file
Просмотреть файл

@ -0,0 +1,22 @@
$createSecrets = Test-Path .\Xamarin.Forms.Controls\secrets.txt
$createMapKeys = Test-Path .\Xamarin.Forms.ControlGallery.Android\Properties\MapsKey.cs
if(-not $createSecrets){
Write-Host "Creating secrets.txt"
New-Item -ItemType File .\Xamarin.Forms.Controls\secrets.txt
}
if(-not $createMapKeys){
Write-Host "Creating MapKeys.cs"
$content = @"
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
[assembly: Android.App.MetaData("com.google.android.maps.v2.API_KEY", Value = "")]
"@
Set-Content .\Xamarin.Forms.ControlGallery.Android\Properties\MapsKey.cs $content
}