Compare commits

..

No commits in common. "master" and "BS-38" have entirely different histories.

102 changed files with 208 additions and 1297 deletions

View File

@ -7,38 +7,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotCompileApp", "NotCompile
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DroidApp", "DroidApp\DroidApp.csproj", "{10AA179F-818F-4E3F-947E-DE1C0C87BB76}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone Release|iPhone = Release|iPhone
Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Debug|iPhone.Build.0 = Debug|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Release|Any CPU.Build.0 = Release|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Release|iPhone.ActiveCfg = Release|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{10AA179F-818F-4E3F-947E-DE1C0C87BB76}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhone.ActiveCfg = Debug|iPhone {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhone.ActiveCfg = Debug|iPhone
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhone.Build.0 = Debug|iPhone {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhone.Build.0 = Debug|iPhone
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhone.ActiveCfg = Release|iPhone {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhone.ActiveCfg = Release|iPhone
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhone.Build.0 = Release|iPhone
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {3DE4FDFA-1502-44CF-9B73-78B6D730C59F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhone.ActiveCfg = Debug|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhone.Build.0 = Debug|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhone.Build.0 = Debug|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhone.ActiveCfg = Release|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhone.ActiveCfg = Release|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhone.Build.0 = Release|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhone.Build.0 = Release|Any CPU
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version='1.0' encoding='utf-8'?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -23,8 +23,7 @@
<MtouchLink>None</MtouchLink> <MtouchLink>None</MtouchLink>
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
<MtouchDebug>true</MtouchDebug> <MtouchDebug>true</MtouchDebug>
<MtouchI18n> <MtouchI18n />
</MtouchI18n>
<MtouchArch>ARMv7</MtouchArch> <MtouchArch>ARMv7</MtouchArch>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
@ -47,8 +46,7 @@
<MtouchDebug>true</MtouchDebug> <MtouchDebug>true</MtouchDebug>
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey> <CodesignKey>iPhone Developer</CodesignKey>
<IpaPackageName> <IpaPackageName />
</IpaPackageName>
<CodesignProvision>F82B1481-F3D0-4CB5-AA6E-8B8D8E3A9DC1</CodesignProvision> <CodesignProvision>F82B1481-F3D0-4CB5-AA6E-8B8D8E3A9DC1</CodesignProvision>
<BuildIpa>true</BuildIpa> <BuildIpa>true</BuildIpa>
</PropertyGroup> </PropertyGroup>
@ -61,10 +59,8 @@
<CodesignKey>iPhone Developer: Рустам Заитов (CTL85FZX6K)</CodesignKey> <CodesignKey>iPhone Developer: Рустам Заитов (CTL85FZX6K)</CodesignKey>
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
<CodesignProvision>8F606DAE-F9C9-4A19-8EFF-34B990D76C28</CodesignProvision> <CodesignProvision>8F606DAE-F9C9-4A19-8EFF-34B990D76C28</CodesignProvision>
<IpaPackageName> <IpaPackageName />
</IpaPackageName> <MtouchI18n />
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7</MtouchArch> <MtouchArch>ARMv7</MtouchArch>
<BuildIpa>true</BuildIpa> <BuildIpa>true</BuildIpa>
</PropertyGroup> </PropertyGroup>

View File

@ -1,19 +0,0 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{10AA179F-818F-4E3F-947E-DE1C0C87BB76}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>DroidApp</RootNamespace>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<AssemblyName>DroidApp</AssemblyName>
<TargetFrameworkVersion>v4.1</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Main.axml" />
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\drawable\Icon.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
</Project>

View File

@ -1,35 +0,0 @@
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace DroidApp
{
[Activity(Label = "DroidApp", MainLauncher = true)]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.myButton);
button.Click += delegate
{
button.Text = string.Format("{0} clicks!", count++);
};
}
}
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="DroidApp.DroidApp">
<uses-sdk />
<application android:label="DroidApp">
</application>
</manifest>

View File

@ -1,23 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("DroidApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("rzaitov")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -1,44 +0,0 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.axml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

View File

@ -1,112 +0,0 @@
#pragma warning disable 1591
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.17020
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
[assembly: Android.Runtime.ResourceDesignerAttribute("DroidApp.Resource", IsApplication=true)]
namespace DroidApp
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7f020000
public const int Icon = 2130837504;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Id
{
// aapt resource value: 0x7f050000
public const int myButton = 2131034112;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f030000
public const int Main = 2130903040;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class String
{
// aapt resource value: 0x7f040001
public const int app_name = 2130968577;
// aapt resource value: 0x7f040000
public const int hello = 2130968576;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
}
}
#pragma warning restore 1591

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/myButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Click Me!</string>
<string name="app_name">DroidApp</string>
</resources>

View File

@ -1,47 +0,0 @@
Добавить символьную ссылку на скрипт сборки. Заменить <builder_path> на абсолютный путь к корню репозитория билд скрипта
sudo ln -s <builder_path>/scripts/TouchinBuild/taskRunner.py /usr/local/bin/tibuild
Чтобы работала система сборки необходимо выполнить формальные шаги:
0. [iOS] Убедиться что в собираемом проекте выбор профиля обеспечения и сертификата производится автоматически.
Так следует сделать чтобы любой разработчик мог собрать проект, на билд сервере будут подставлены необоходимы значения автоматически
1. [iOS, Android] Убедиться что в названии проекта нет пробелов.
2. [iOS, Android] В корне репозитория создать папку scripts
mkdir scripts
3. [iOS] Положить в папку scripts профили обеспечения со следующими названиями
development.mobileprovision
distribution.mobileprovision
4. [iOS, Android] В папке scripts создать файл settings.txt
touch scripts/settings.txt
5. [iOS, Android] Скопировать содержимое примера scripts/common/setting.txt в свой файл settings.txt и переопределить все необходимые настройки
Стоит обратить внимание на комментации
# required эти настройки необходимо задать, иначе ничего не будет работать
# dont change это можно менять если есть четкое осознание того что происходит
6. [iOS, Android] вызвать скрипт, заменив параметры
на сервере. <builder_path> скорее всего это /BuildServer/Scripts
tibuild --settings=scripts/settings.txt build=%build.number% builder_path=<builder_path>
локально. path_to_local_direcotry путь к папке вне репозитория проекта (чтобы ничего не потерлось) или добавить папку в настройку backup_ignore
tibuild --settings=scripts/settings.txt build=777 builder_path=<builder_path> publish_path=<path_to_local_direcotry>
Пояснение значения некоторых настроек:
publish_step_type enum(development|distribution) в зависимости от этого значения будет вызван один из следующих шагов
'ios publish development.txt' копирование файла ipa в папку @publish_path/
'ios publish distribution.txt' - создание zip архива (app файла) и копирование его в папку @publish_path/
Это значение было введено чтобы поддерживать сборку с разными профилями обеспечения.
Типичный кейс. У нас 2 профайла:
development.mobileprovision сборка для наших тестировщиков [publish_step_type=development]
distribution.mobileprovision сборка для апстора [publish_step_type=distribution]
Расширенный кейс. У нас 3 профайла
development.mobileprovision сборка для наших тестировщиков [publish_step_type=development]
customer.mobileprovision сборка для тестировщиков заказчиков [publish_step_type=development]
distribution.mobileprovision сборка для апстора [publish_step_type=distribution]
bundle_id BundleId который будет подставлен в Info.Plist файл. Настройка нужна для поддержки сборки с разными профилями обсеспечеиня. Так например в профиле обеспечения предоставляемом заказчиком будет указан другой BunldeId, те не com.touchin.projectname

View File

@ -1,19 +0,0 @@
restore from backup
create backup
inside 'BuildSample/BuildSample.sln' remove 'CoolApp:NotCompileApp:Domain' project
inside 'BuildSample/DroidApp/DroidApp.csproj' set OutputPath to 'Output' for '{@sln_config}'
inside 'BuildSample/DroidApp/Properties/AndroidManifest.xml' set android:versionCode to '17'
inside 'BuildSample/DroidApp/Properties/AndroidManifest.xml' set android:versionName to '1.2.3'
clean 'BuildSample/BuildSample.sln' for '{@sln_config}'
sign android 'BuildSample/BuildSample.sln' for '{@sln_config_build}' project 'DroidApp'
create dirs 'Output/GooglePlay/Artifacts'
sh cp BuildSample/DroidApp/Output/*.apk Output/GooglePlay/Artifacts
sh cp -a BuildSample/DroidApp/Output/ Output/GooglePlay/
restore from backup
delete backup

View File

@ -1,15 +1,17 @@
restore from backup # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными) sh echo 'IosSetupSteps.txt'
create backup
sh echo 'Hello from setup.txt' # restore from backup # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными)
# create backup
inside 'BuildSample/BuildSample.sln' remove 'NotCompileApp:DroidApp' project sh echo '{@sln_config}'
inside 'BuildSample/BuildSample.sln' remove NotCompileApp project
inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output' for '{@sln_config}' inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output' for '{@sln_config}'
inside 'BuildSample/BuildSample/CoolApp.csproj' set AssemblyName to '{@assembly_name}' for '' inside 'BuildSample/BuildSample/CoolApp.csproj' set AssemblyName to '{@assembly_name}' for ''
inside 'BuildSample/BuildSample/Info.plist' set CFBundleVersion to '{@version}' inside 'BuildSample/BuildSample/Info.plist' set CFBundleVersion to '{@version}'
inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to '{@project_name}' inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to 'CoolApp'
inside 'BuildSample/BuildSample/Info.plist' set CFBundleIconFiles with values '{@icons}' inside 'BuildSample/BuildSample/Info.plist' set CFBundleIconFiles with values '{@icons}'

View File

@ -1,5 +1,11 @@
sh echo 'IosSteps.txt'
sh echo '{@builder_path}'
<include 'scripts/{@setup_steps}'> <include 'scripts/{@setup_steps}'>
sh echo hello from '{@author}'
sh echo version: '{@version}'
clean 'BuildSample/BuildSample.sln' for '{@sln_config}' clean 'BuildSample/BuildSample.sln' for '{@sln_config}'
build 'BuildSample/BuildSample.sln' for '{@sln_config}' build 'BuildSample/BuildSample.sln' for '{@sln_config}'
@ -7,7 +13,7 @@ create dirs 'Output/Appstore/Artifacts'
copy 'BuildSample/BuildSample/Output/{@assembly_name}-{@version}.ipa' to 'Output/Appstore/Artifacts' copy 'BuildSample/BuildSample/Output/{@assembly_name}-{@version}.ipa' to 'Output/Appstore/Artifacts'
sh cp -a BuildSample/BuildSample/Output/ Output/Appstore/ sh cp -a BuildSample/BuildSample/Output/ Output/Appstore/
#publish 'Output/Appstore/Artifacts/{@assembly_name}-{@version}.ipa' to testflight notes = 'Hello' api_token = '{@tf_api_token}' team_token = '{@tf_team_token}' publish 'Output/Appstore/Artifacts/{@assembly_name}-{@version}.ipa' to testflight notes = 'Hello' api_token = '{@tf_api_token}' team_token = '{@tf_team_token}'
restore from backup #restore from backup
delete backup #delete backup

View File

@ -1,12 +0,0 @@
from parsers.ValuesStriper import ValuesStripper
class BaseBackupCommandBuilder:
def __init__(self, ignoreBackupStr):
if ignoreBackupStr:
splitter = ValuesStripper(',')
values = splitter.strip(ignoreBackupStr)
self.ignoreBackup = values
else:
self.ignoreBackup = []

View File

@ -1 +0,0 @@
__author__ = 'rzaitov'

View File

@ -1,11 +1,10 @@
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
from commands.BaseBackupCommand.CreateBackupCommand import CreateBackupCommand from commands.BaseBackupCommand.CreateBackupCommand import CreateBackupCommand
from parsers.ParserBackup.CreateBackupParser import CreateBackupParser from parsers.ParserBackup.CreateBackupParser import CreateBackupParser
class CreateBackupCommandBuilder(BaseBackupCommandBuilder): class CreateBackupCommandBuilder:
def __init__(self, ignoreBackupStr): def __init__(self):
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr) pass
def isCreateBackup(self, line): def isCreateBackup(self, line):
assert line is not None assert line is not None
@ -19,5 +18,5 @@ class CreateBackupCommandBuilder(BaseBackupCommandBuilder):
parser = CreateBackupParser() parser = CreateBackupParser()
parser.parseLine(line) parser.parseLine(line)
command = CreateBackupCommand(self.ignoreBackup) command = CreateBackupCommand()
return command return command

View File

@ -1,11 +1,10 @@
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
from commands.BaseBackupCommand.DeleteBackupCommand import DeleteBackupCommand from commands.BaseBackupCommand.DeleteBackupCommand import DeleteBackupCommand
from parsers.ParserBackup.DeleteBackupParser import DeleteBackupParser from parsers.ParserBackup.DeleteBackupParser import DeleteBackupParser
class DeleteBackupCommandBuilder(BaseBackupCommandBuilder): class DeleteBackupCommandBuilder:
def __init__(self, ignoreBackupStr): def __init__(self):
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr) pass
def isDeleteBackup(self, line): def isDeleteBackup(self, line):
assert line is not None assert line is not None
@ -21,5 +20,5 @@ class DeleteBackupCommandBuilder(BaseBackupCommandBuilder):
parser = DeleteBackupParser() parser = DeleteBackupParser()
parser.parseLine(line) parser.parseLine(line)
command = DeleteBackupCommand(self.ignoreBackup) command = DeleteBackupCommand()
return command return command

View File

@ -1,46 +1,21 @@
import os
from commands.CopyCommand import CopyCommand from commands.CopyCommand import CopyCommand
from parsers.CopyParser.CopyArguments import CopyArguments
from parsers.InstallProfileParser import InstallProfileParser from parsers.InstallProfileParser import InstallProfileParser
class InstallProfileCommandBuilder: class InstallProfileCommandBuilder:
def __init__(self, profileFilePrefix): def __init__(self):
assert profileFilePrefix is not None pass
self.profileFilePrefix = profileFilePrefix
self.profileStorageDir = '~/Library/MobileDevice/Provisioning Profiles/'
def isInstallProfile(self, line): def isInstallProfile(self, line):
assert line is not None assert line is not None
parser = InstallProfileParser() return line.startswith('install profile')
isValid = parser.isValidLine(line)
return isValid
def getCommandFor(self, line): def getCommandFor(self, line):
assert line is not None assert line is not None
parser = InstallProfileParser() parser = InstallProfileParser()
cpArgs = parser.parseLine(line)
srcPath = parser.parseLine(line)
dstPath = self.getDestinationPath(srcPath)
cpArgs = CopyArguments()
cpArgs.setArguments(srcPath, dstPath)
command = CopyCommand(cpArgs) command = CopyCommand(cpArgs)
return command return command
def getDestinationPath(self, sourcePath):
dstProfileFileName = self.fetchDstFileName(sourcePath)
dstProfilePath = os.path.join(self.profileStorageDir, dstProfileFileName)
return dstProfilePath
def fetchDstFileName(self, srcFilePath):
profileFileName = os.path.basename(srcFilePath)
profileFileName = '{0}.{1}'.format(self.profileFilePrefix, profileFileName)
return profileFileName

View File

@ -1,24 +0,0 @@
from commands.PatchManifestCommand import PatchManifestCommand
from parsers.InsideParser.InsideSetParser import InsideSetParser
class PatchManifestCommandBuilder:
def __init__(self):
pass
def isManifestCommand(self, line):
assert line is not None
parser = InsideSetParser('xml')
isValid = parser.isValidLine(line)
return isValid
def getCommandFor(self, line):
assert line is not None
parser = InsideSetParser('xml')
result = parser.parseLine(line)
command = PatchManifestCommand(result[0], result[1], result[2])
return command

View File

@ -20,8 +20,8 @@ class RemoveProjectCommandBuilder:
parser = InsideRemoveParser('sln') parser = InsideRemoveParser('sln')
result = parser.parseLine(line) result = parser.parseLine(line)
slnPath = result['file_path'] slnPath = result[0]
projectNames = result['names'] projectName = result[1]
command = RemoveProjectCommand(slnPath, projectNames) command = RemoveProjectCommand(slnPath, projectName)
return command return command

View File

@ -1,11 +1,10 @@
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
from commands.BaseBackupCommand.RestoreBackupCommand import RestoreBackupCommand from commands.BaseBackupCommand.RestoreBackupCommand import RestoreBackupCommand
from parsers.ParserBackup.RestoreBackupParser import RestoreBackupParser from parsers.ParserBackup.RestoreBackupParser import RestoreBackupParser
class RestoreBackupCommandBuilder(BaseBackupCommandBuilder): class RestoreBackupCommandBuilder:
def __init__(self, ignoreBackupStr): def __init__(self):
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr) pass
def isRestoreBackup(self, line): def isRestoreBackup(self, line):
assert line is not None assert line is not None
@ -21,5 +20,5 @@ class RestoreBackupCommandBuilder(BaseBackupCommandBuilder):
parser = RestoreBackupParser() parser = RestoreBackupParser()
parser.parseLine(line) parser.parseLine(line)
command = RestoreBackupCommand(self.ignoreBackup) command = RestoreBackupCommand()
return command return command

View File

@ -1,4 +1,4 @@
from commands.ShTextCommand import ShTextCommand from commands.ShCommand import ShCommand
from parsers.ShParser import ShParser from parsers.ShParser import ShParser
@ -19,5 +19,5 @@ class ShCommandBuilder:
cmdText = parser.parseLine(line) cmdText = parser.parseLine(line)
command = ShTextCommand(cmdText) command = ShCommand(cmdText)
return command return command

View File

@ -1,30 +0,0 @@
from commands.CleanBuildCommands.SignApkCommand import SignApkCommand
from parsers.SignApkParser import SignApkParser
class SignApkCommandBuilder:
def __init__(self, pathToBuildUtil):
assert pathToBuildUtil is not None
self.pathToBuildUtil = pathToBuildUtil
def isSignApk(self, line):
assert line is not None
parser = SignApkParser()
isValid = parser.isValidLine(line)
return isValid
def getCommandFor(self, line):
assert line is not None
parser = SignApkParser()
result = parser.parseLine(line)
slnPath = result[0]
slnConfig = result[1]
projectName = result[2]
command = SignApkCommand(self.pathToBuildUtil, slnPath, slnConfig, projectName)
return command

View File

@ -1,7 +1,7 @@
import abc import abc
class PreprocessorBase(object): class PreprocessorBase:
__metaclass__ = abc.ABCMeta __metaclass__ = abc.ABCMeta
def __init__(self): def __init__(self):

View File

@ -1,18 +1,15 @@
from CommandBuilders.BuilderBackupCommands.CreateBackupCommandBuilder import CreateBackupCommandBuilder
from CommandBuilders.BuilderBackupCommands.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
from CommandBuilders.BuilderBackupCommands.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
from CommandBuilders.CleanBuildCommandBuilder import CleanBuildCommandBuilder from CommandBuilders.CleanBuildCommandBuilder import CleanBuildCommandBuilder
from CommandBuilders.CopyCommandBuilder import CopyCommandBuilder from CommandBuilders.CopyCommandBuilder import CopyCommandBuilder
from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder
from CommandBuilders.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBuilder from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBuilder
from CommandBuilders.MakeDirsCommandBuilder import MakeDirsCommandBuilder from CommandBuilders.MakeDirsCommandBuilder import MakeDirsCommandBuilder
from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder
from CommandBuilders.PatchInfoPlistArrayCommandBuilder import PatchInfoPlistArrayCommandBuilder from CommandBuilders.PatchInfoPlistArrayCommandBuilder import PatchInfoPlistArrayCommandBuilder
from CommandBuilders.PatchInfoplistCommandBuilder import PatchInfoplistCommandBuilder from CommandBuilders.PatchInfoplistCommandBuilder import PatchInfoplistCommandBuilder
from CommandBuilders.PatchManifestCommandBuilder import PatchManifestCommandBuilder
from CommandBuilders.RemoveProjectCommandBuilder import RemoveProjectCommandBuilder from CommandBuilders.RemoveProjectCommandBuilder import RemoveProjectCommandBuilder
from CommandBuilders.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
from CommandBuilders.ShCommandBuilder import ShCommandBuilder from CommandBuilders.ShCommandBuilder import ShCommandBuilder
from CommandBuilders.SignApkBuilder import SignApkCommandBuilder
from CommandBuilders.TestflightCommandBuilder import TestflightCommandBuilder from CommandBuilders.TestflightCommandBuilder import TestflightCommandBuilder
@ -27,27 +24,20 @@ class StepsRunner:
self.shCommandBuilder = ShCommandBuilder() self.shCommandBuilder = ShCommandBuilder()
self.removeProjectBuilder = RemoveProjectCommandBuilder() self.removeProjectBuilder = RemoveProjectCommandBuilder()
self.createBackupBuilder = CreateBackupCommandBuilder()
self.restoreFromBackupBuilder = RestoreBackupCommandBuilder()
self.deleteBackupBuilder = DeleteBackupCommandBuilder()
self.createDirs = MakeDirsCommandBuilder() self.createDirs = MakeDirsCommandBuilder()
self.patchCsproj = PatchCsprojCommandBuilder() self.patchCsproj = PatchCsprojCommandBuilder()
self.patchInfoPlist = PatchInfoplistCommandBuilder(self.valueProvider) self.patchInfoPlist = PatchInfoplistCommandBuilder(self.valueProvider)
self.patchInfoPlistArray = PatchInfoPlistArrayCommandBuilder() self.patchInfoPlistArray = PatchInfoPlistArrayCommandBuilder()
self.patchManifest = PatchManifestCommandBuilder()
self.copyBuilder = CopyCommandBuilder() self.copyBuilder = CopyCommandBuilder()
self.testflightBuilder = TestflightCommandBuilder() self.testflightBuilder = TestflightCommandBuilder()
self.installProfileBuilder = InstallProfileCommandBuilder()
ignoreBackup = config.get('backup_ignore', None)
self.createBackupBuilder = CreateBackupCommandBuilder(ignoreBackup)
self.restoreFromBackupBuilder = RestoreBackupCommandBuilder(ignoreBackup)
self.deleteBackupBuilder = DeleteBackupCommandBuilder(ignoreBackup)
profilePrefix = config['project_name']
self.installProfileBuilder = InstallProfileCommandBuilder(profilePrefix)
buildUtilPath = config['build_tool'] buildUtilPath = config['build_tool']
self.cleanBuilder = CleanBuildCommandBuilder(buildUtilPath, 'clean') self.cleanBuilder = CleanBuildCommandBuilder(buildUtilPath, 'clean')
self.buildBuilder = CleanBuildCommandBuilder(buildUtilPath, 'build') self.buildBuilder = CleanBuildCommandBuilder(buildUtilPath, 'build')
self.signAndroid = SignApkCommandBuilder(buildUtilPath)
def run(self, content): def run(self, content):
assert content is not None assert content is not None
@ -70,8 +60,6 @@ class StepsRunner:
cmd = self.cleanBuilder.getCommandFor(line) cmd = self.cleanBuilder.getCommandFor(line)
elif self.buildBuilder.isCleanBuild(line): elif self.buildBuilder.isCleanBuild(line):
cmd = self.buildBuilder.getCommandFor(line) cmd = self.buildBuilder.getCommandFor(line)
elif self.signAndroid.isSignApk(line):
cmd = self.signAndroid.getCommandFor(line)
elif self.createBackupBuilder.isCreateBackup(line): elif self.createBackupBuilder.isCreateBackup(line):
cmd = self.createBackupBuilder.getCommandFor(line) cmd = self.createBackupBuilder.getCommandFor(line)
elif self.createDirs.isMakeDirsCommand(line): elif self.createDirs.isMakeDirsCommand(line):
@ -82,8 +70,6 @@ class StepsRunner:
cmd = self.patchInfoPlist.getCommandFor(line) cmd = self.patchInfoPlist.getCommandFor(line)
elif self.patchInfoPlistArray.isPatchInfoPlist(line): elif self.patchInfoPlistArray.isPatchInfoPlist(line):
cmd = self.patchInfoPlistArray.getCommandFor(line) cmd = self.patchInfoPlistArray.getCommandFor(line)
elif self.patchManifest.isManifestCommand(line):
cmd = self.patchManifest.getCommandFor(line)
elif self.copyBuilder.isCopy(line): elif self.copyBuilder.isCopy(line):
cmd =self.copyBuilder.getCommandFor(line) cmd =self.copyBuilder.getCommandFor(line)
elif self.restoreFromBackupBuilder.isRestoreBackup(line): elif self.restoreFromBackupBuilder.isRestoreBackup(line):

View File

@ -1,4 +1,3 @@
from Core.LineConveyor.NullPreprocessor import NullPreprocessor
from Core.SettingsProviderBase import SettingsProviderBase from Core.SettingsProviderBase import SettingsProviderBase
from parsers.SettingsParser.SettingsParser import SettingsParser from parsers.SettingsParser.SettingsParser import SettingsParser
@ -11,9 +10,7 @@ class SettingsProviderStub(SettingsProviderBase):
self.settingsText = settingsText self.settingsText = settingsText
def fetchSettings(self): def fetchSettings(self):
preprocessor = NullPreprocessor() parser = SettingsParser()
parser = SettingsParser(preprocessor, None)
parser.parse(self.settingsText) parser.parse(self.settingsText)
return parser.settings return parser.settings

View File

@ -1,8 +1,8 @@
from CommandBuilders.BuilderBackupCommands.CreateBackupCommandBuilder import CreateBackupCommandBuilder from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder
line = "create backup" line = "create backup"
cmdBuilder = CreateBackupCommandBuilder(None) cmdBuilder = CreateBackupCommandBuilder()
command = cmdBuilder.getCommandFor(line) command = cmdBuilder.getCommandFor(line)
command.execute() command.execute()

View File

@ -1,8 +1,8 @@
from CommandBuilders.BuilderBackupCommands.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder from CommandBuilders.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
line = "delete backup" line = "delete backup"
cmdBuilder = DeleteBackupCommandBuilder(None) cmdBuilder = DeleteBackupCommandBuilder()
command = cmdBuilder.getCommandFor(line) command = cmdBuilder.getCommandFor(line)
command.execute() command.execute()

View File

@ -2,7 +2,7 @@ from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBu
line = "install profile 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision'" line = "install profile 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision'"
builder = InstallProfileCommandBuilder('BsProject') builder = InstallProfileCommandBuilder()
command = builder.getCommandFor(line) command = builder.getCommandFor(line)
command.execute() command.execute()

View File

@ -1,8 +1,6 @@
from Core.ContentProviderBase import ContentProviderBase from Core.ContentProviderBase import ContentProviderBase
from Core.LineConveyor.NullPreprocessor import NullPreprocessor
from Tests.Common.SettingsProviderStub import SettingsProviderStub from Tests.Common.SettingsProviderStub import SettingsProviderStub
from taskRunner import TaskRunner from taskRunner import TaskRunner
from utils.BuildConfigProvider.BuildConfigProvider import BuildConfigProvider
settingsText = """ settingsText = """
build_tool = '/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool' build_tool = '/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool'
@ -44,9 +42,6 @@ class ContentProviderMock(ContentProviderBase):
settingsProvider = SettingsProviderStub(settingsText) settingsProvider = SettingsProviderStub(settingsText)
contentProvider = ContentProviderMock() contentProvider = ContentProviderMock()
buildConfigProvider = BuildConfigProvider() taskRunner = TaskRunner(settingsProvider, contentProvider)
preprocessor = NullPreprocessor()
taskRunner = TaskRunner(settingsProvider, contentProvider, buildConfigProvider, preprocessor, {})
taskRunner.run() taskRunner.run()

View File

@ -1,8 +0,0 @@
from CommandBuilders.PatchManifestCommandBuilder import PatchManifestCommandBuilder
line = "inside 'BuildSample/DroidApp/Properties/AndroidManifest.xml' set android:versionCode to '7.7.7'"
builder = PatchManifestCommandBuilder()
command = builder.getCommandFor(line)
command.execute()

View File

@ -1,5 +1,4 @@
from Core.ContentProviderBase import ContentProviderBase from Core.ContentProviderBase import ContentProviderBase
from Core.LineConveyor.NullPreprocessor import NullPreprocessor
from Tests.Common.SettingsProviderStub import SettingsProviderStub from Tests.Common.SettingsProviderStub import SettingsProviderStub
from taskRunner import TaskRunner from taskRunner import TaskRunner
from utils.BuildConfigProvider.BuildConfigProvider import BuildConfigProvider from utils.BuildConfigProvider.BuildConfigProvider import BuildConfigProvider
@ -38,9 +37,8 @@ buildConfigProvider = BuildConfigProvider()
resolvedBuildConfigProvider = ResolvedBuildConfigProvider(buildConfigProvider) resolvedBuildConfigProvider = ResolvedBuildConfigProvider(buildConfigProvider)
contentProvider = ContentProviderMock() contentProvider = ContentProviderMock()
preprocessor = NullPreprocessor()
taskRunner = TaskRunner(settingsProvider, contentProvider, resolvedBuildConfigProvider, preprocessor, {}) taskRunner = TaskRunner(settingsProvider, contentProvider, resolvedBuildConfigProvider)
taskRunner.run() taskRunner.run()

View File

@ -1,8 +1,8 @@
from CommandBuilders.BuilderBackupCommands.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder from CommandBuilders.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
line = "restore from backup" line = "restore from backup"
builder = RestoreBackupCommandBuilder(None) builder = RestoreBackupCommandBuilder()
command = builder.getCommandFor(line) command = builder.getCommandFor(line)
command.execute() command.execute()

View File

@ -1,7 +1,7 @@
from commands.ShTextCommand import ShTextCommand from commands.ShCommand import ShCommand
calendarCommand = ShTextCommand('cal 12 2013') calendarCommand = ShCommand('cal 12 2013')
calendarCommand.execute() calendarCommand.execute()
touchCommand = ShTextCommand('touch ../tmp.txt') touchCommand = ShCommand('touch ../tmp.txt')
touchCommand.execute() touchCommand.execute()

View File

@ -1,21 +0,0 @@
import unittest
from parsers.InsideParser.InsideRemoveParser import InsideRemoveParser
class TestInsideRemoveParser(unittest.TestCase):
def setUp(self):
self.parser = InsideRemoveParser('ext')
def test_parse(self):
self.check("inside 'Some/Path/file.ext' remove 'PROGECT' project", 'Some/Path/file.ext', ['PROGECT'])
self.check("inside 'file.ext' remove 'PR' projects", 'file.ext', ['PR'])
self.check("inside 'file.ext' remove 'PR' projects", 'file.ext', ['PR'])
self.check("inside 'file.ext' remove 'pr1:pr2:pr3' projects", 'file.ext', ['pr1', 'pr2', 'pr3'])
def check(self, line, filePath, expectedNames):
result = self.parser.parseLine(line)
self.assertEqual(filePath, result['file_path'])
self.assertListEqual(expectedNames, result['names'])

View File

@ -1,3 +1,4 @@
import unittest
from Tests.UnitTests.LineParserTestCaseBase import LineParserTestCaseBase from Tests.UnitTests.LineParserTestCaseBase import LineParserTestCaseBase
from parsers.InsideParser.InsideSetArrayParser import InsideSetArrayParser from parsers.InsideParser.InsideSetArrayParser import InsideSetArrayParser

View File

@ -8,6 +8,7 @@ class TestInstallProfile(unittest.TestCase):
def test_parse(self): def test_parse(self):
line = "install profile 'Path/To/Profile.mobileprovision'" line = "install profile 'Path/To/Profile.mobileprovision'"
src = self.parser.parseLine(line) copyArgs = self.parser.parseLine(line)
self.assertEqual('Path/To/Profile.mobileprovision', src) self.assertEqual('Path/To/Profile.mobileprovision', copyArgs.source)
self.assertEqual('~/Library/MobileDevice/Provisioning Profiles/Profile.mobileprovision', copyArgs.target)

View File

@ -1,16 +0,0 @@
import unittest
from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBuilder
class TestInstallProfileBuilder(unittest.TestCase):
def setUp(self):
self.prefix = 'MyProject'
self.builder = InstallProfileCommandBuilder(self.prefix)
def test_dstFileName(self):
dstFileName = self.builder.fetchDstFileName('/Some/Path/MyProfile.ext')
self.assertEqual(dstFileName, '{0}.MyProfile.ext'.format(self.prefix))
def test_dstPath(self):
dstPath = self.builder.getDestinationPath('/Some/Path/MyProfile.ext')
self.assertEqual('~/Library/MobileDevice/Provisioning Profiles/{0}.MyProfile.ext'.format(self.prefix), dstPath)

View File

@ -7,27 +7,9 @@ class TestSettingsLineParser(unittest.TestCase):
def setUp(self): def setUp(self):
self.parser = SettingsLineParser() self.parser = SettingsLineParser()
def test_whiteSpaces(self): def test_getPathAndValue(self):
self.checkPathAndValue("abc.123.some_name = 'crazy value ±~ ../ 123'", 'abc.123.some_name', 'crazy value ±~ ../ 123') line = "abc.123.some_name = 'crazy value ±~ ../ 123'"
self.checkPathAndValue("a.b.c = 'value'", 'a.b.c', 'value')
self.checkPathAndValue("a.b.c= 'value'", 'a.b.c', 'value')
self.checkPathAndValue("a.b.c ='value'", 'a.b.c', 'value')
self.checkPathAndValue("a.b.c='value'", 'a.b.c', 'value')
def test_valueWithoutComma(self):
self.checkPathAndValue("a.b.c = value", 'a.b.c', 'value')
self.checkPathAndValue("a.b.c = some value", 'a.b.c', 'some value')
self.checkPathAndValue("a.b.c = some value ", 'a.b.c', 'some value')
def test_valueWithEscapeComma(self):
self.checkPathAndValue("a.b.c = '\"value\"' ", 'a.b.c', '"value"')
self.checkPathAndValue('a.b.c = "\'value\'" ', 'a.b.c', "'value'")
self.checkPathAndValue('a.b.c = ""value"" ', 'a.b.c', 'value')
self.checkPathAndValue("a.b.c = ''value'' ", 'a.b.c', 'value')
def checkPathAndValue(self, line, expectedPath, expectedValue):
result = self.parser.splitToPathAndValue(line) result = self.parser.splitToPathAndValue(line)
self.assertEqual(expectedPath, result[0]) self.assertEqual('abc.123.some_name', result[0])
self.assertEqual(expectedValue, result[1]) self.assertEqual('crazy value ±~ ../ 123', result[1])

View File

@ -8,7 +8,7 @@ from parsers.SettingsParser.SettingsParser import SettingsParser
class TestSettingsParser(unittest.TestCase): class TestSettingsParser(unittest.TestCase):
def setUp(self): def setUp(self):
self.preprocessor = NullPreprocessor() self.preprocessor = NullPreprocessor()
self.parser = SettingsParser(self.preprocessor, None) self.parser = SettingsParser(self.preprocessor)
def test_processLine(self): def test_processLine(self):
line1 = "x.y.name1 = 'value1'" line1 = "x.y.name1 = 'value1'"
@ -44,7 +44,7 @@ class TestSettingsParser(unittest.TestCase):
class PartialSettingsParser(SettingsParser): class PartialSettingsParser(SettingsParser):
def __init__(self, textPreprocessor): def __init__(self, textPreprocessor):
SettingsParser.__init__(self, textPreprocessor, None) SettingsParser.__init__(self, textPreprocessor)
self.processLineCall = 0 self.processLineCall = 0
def processLine(self, line): def processLine(self, line):

View File

@ -1 +0,0 @@
__author__ = 'rzaitov'

View File

@ -1,24 +0,0 @@
import unittest
from commands.ShellCommandBase import ShellCommandBase
class MyShellCommand(ShellCommandBase):
def __init__(self, execWithError=False):
ShellCommandBase.__init__(self)
self.execWithError = execWithError
def execute(self):
cmdText = 'exit 1' if self.execWithError else 'exit 0'
self.executeShell(cmdText)
class TestShellCommand(unittest.TestCase):
def test_noError(self):
cmd = MyShellCommand(execWithError=False)
cmd.execute()
def test_withError(self):
cmd = MyShellCommand(execWithError=True)
with self.assertRaises(Exception):
cmd.execute()

View File

@ -1 +0,0 @@
__author__ = 'rzaitov'

View File

@ -1,25 +0,0 @@
import unittest
from utils.ManifestPatcher import ManifestPatcher
class TestManifestPatcher(unittest.TestCase):
def setUp(self):
self.patcher = ManifestPatcher('somePath')
def test_parseRawName(self):
nameInfo1 = self.patcher.parseRawName('simpleName')
self.assertEqual(None, nameInfo1['prefix'])
self.assertEqual('simpleName', nameInfo1['original_name'])
nameInfo2 = self.patcher.parseRawName('prefix:originalName')
self.assertEqual('prefix', nameInfo2['prefix'])
self.assertEqual('originalName', nameInfo2['original_name'])
def test_fetchName(self):
nameInfo = {
'prefix': 'android',
'original_name': 'MyName'
}
name = self.patcher.fetchName(nameInfo)
self.assertEqual('{http://schemas.android.com/apk/res/android}MyName', name)

View File

@ -1,11 +0,0 @@
import unittest
from utils.XmlPatcher import XmlPatcher
class TestXmlPatcher(unittest.TestCase):
def setUp(self):
self.patcher = XmlPatcher('somePath')
def test_getNameWithNs(self):
name = self.patcher.getNameWithNs('OriginalName', 'http://namespace')
self.assertEqual('{http://namespace}OriginalName', name)

View File

@ -1,17 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
from commands.CommandBase import CommandBase
class BaseBackupCommand(CommandBase): class BaseBackupCommand:
def __init__(self, ignoreBackup): def __init__(self):
CommandBase.__init__(self)
assert ignoreBackup is not None
self.backupIgnore = ['.git', '.gitignore', '.DS_Store', 'backup']
self.backupIgnore.extend(ignoreBackup)
self.folderPath = '.' self.folderPath = '.'
# вычислять абсолютные пути надо на этапе создания комманды # вычислять абсолютные пути надо на этапе создания комманды
@ -19,6 +12,7 @@ class BaseBackupCommand(CommandBase):
self.srcAbsDirPath = self.getAbsSrc() self.srcAbsDirPath = self.getAbsSrc()
self.backupDirAbsPath = self.getAbsDst() self.backupDirAbsPath = self.getAbsDst()
self.backupIgnore = ['.git', '.gitignore', '.DS_Store', 'backup']
def getAbsSrc(self): def getAbsSrc(self):
return self.getAbs(self.folderPath) return self.getAbs(self.folderPath)

View File

@ -4,8 +4,8 @@ from commands.BaseBackupCommand.BaseBackupCommand import BaseBackupCommand
class CreateBackupCommand(BaseBackupCommand): class CreateBackupCommand(BaseBackupCommand):
def __init__(self, ignoreBackup): def __init__(self):
BaseBackupCommand.__init__(self, ignoreBackup) BaseBackupCommand.__init__(self)
def execute(self): def execute(self):
#if os.path.exists(self.backupDirAbsPath): #if os.path.exists(self.backupDirAbsPath):

View File

@ -4,8 +4,8 @@ from commands.BaseBackupCommand.BaseBackupCommand import BaseBackupCommand
class DeleteBackupCommand(BaseBackupCommand): class DeleteBackupCommand(BaseBackupCommand):
def __init__(self, ignoreBackup): def __init__(self):
BaseBackupCommand.__init__(self, ignoreBackup) BaseBackupCommand.__init__(self)
def execute(self): def execute(self):
if not os.path.exists(self.backupDirAbsPath): if not os.path.exists(self.backupDirAbsPath):

View File

@ -4,8 +4,8 @@ from commands.BaseBackupCommand.BaseBackupCommand import BaseBackupCommand
class RestoreBackupCommand(BaseBackupCommand): class RestoreBackupCommand(BaseBackupCommand):
def __init__(self, ignoreBackup): def __init__(self):
BaseBackupCommand.__init__(self, ignoreBackup) BaseBackupCommand.__init__(self)
def execute(self): def execute(self):
if not os.path.exists(self.backupDirAbsPath): if not os.path.exists(self.backupDirAbsPath):

View File

@ -1,10 +1,8 @@
from commands.ShellCommandBase import ShellCommandBase from subprocess import call
class CleanBuildCommandBase(ShellCommandBase): class CleanBuildCommandBase:
def __init__(self, commandPattern, pathToBuildUtil, slnPath, slnConfig): def __init__(self, commandPattern, pathToBuildUtil, slnPath, slnConfig):
ShellCommandBase.__init__(self)
assert commandPattern is not None assert commandPattern is not None
assert pathToBuildUtil is not None assert pathToBuildUtil is not None
assert slnPath is not None assert slnPath is not None
@ -17,5 +15,4 @@ class CleanBuildCommandBase(ShellCommandBase):
def execute(self): def execute(self):
cmdText = self.__commandPattern.format(self.__pathToBuildUtil, self.__slnConfig, self.__slnPath) cmdText = self.__commandPattern.format(self.__pathToBuildUtil, self.__slnConfig, self.__slnPath)
call(cmdText, shell=True)
self.executeShell(cmdText)

View File

@ -1,23 +0,0 @@
from commands.ShellCommandBase import ShellCommandBase
class SignApkCommand(ShellCommandBase):
def __init__(self, pathToBuildUtil, slnPath, slnConfig, projectName):
ShellCommandBase.__init__(self)
assert pathToBuildUtil is not None
assert slnPath is not None
assert slnConfig is not None
assert projectName is not None
self.pathToBuildUtil = pathToBuildUtil
self.slnPath = slnPath
self.slnConfig = slnConfig
self.projectName = projectName
self.commandPattern = '{0} -v build "--configuration:{1}" "--project:{2}" /t:SignAndroidPackage "{3}"'
def execute(self):
cmdText = self.commandPattern.format(self.pathToBuildUtil, self.slnConfig, self.projectName, self.slnPath)
print cmdText
self.executeShell(cmdText)

View File

@ -1,12 +0,0 @@
import abc
class CommandBase(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
pass
@abc.abstractmethod
def execute(self):
pass

View File

@ -1,12 +1,8 @@
import shutil import shutil
import os import os
from commands.CommandBase import CommandBase
class CopyCommand:
class CopyCommand(CommandBase):
def __init__(self, copyArguments): def __init__(self, copyArguments):
CommandBase.__init__(self)
assert copyArguments is not None assert copyArguments is not None
self.__copyArguments = copyArguments self.__copyArguments = copyArguments

View File

@ -1,10 +1,13 @@
from commands.ShTextCommand import ShTextCommand from commands.ShCommand import ShCommand
class MakeDirsCommand(ShTextCommand): class MakeDirsCommand:
def __init__(self, path): def __init__(self, path):
assert path is not None assert path is not None
self.path = path
cmdText = "mkdir -p '{0}'".format(self.path) self.__path = path
ShTextCommand.__init__(self, cmdText)
def execute(self):
cmdText = "mkdir -p '{0}'".format(self.__path)
innerCommand = ShCommand(cmdText)
innerCommand.execute()

View File

@ -1,10 +1,7 @@
from commands.CommandBase import CommandBase
import utils.CsprojPatcher as csproj import utils.CsprojPatcher as csproj
class PatchCsprojCommand(CommandBase): class PatchCsprojCommand():
def __init__(self, csprojAbsPath, key, value, slnConfig): def __init__(self, csprojAbsPath, key, value, slnConfig):
CommandBase.__init__(self)
assert csprojAbsPath is not None assert csprojAbsPath is not None
assert key is not None assert key is not None
assert value is not None assert value is not None

View File

@ -1,11 +1,8 @@
from commands.CommandBase import CommandBase
from utils.InfoPlistPatcher import InfoPlistPatcher from utils.InfoPlistPatcher import InfoPlistPatcher
class PatchInfoPlistCommand(CommandBase): class PatchInfoPlistCommand():
def __init__(self, pathToPlist, key, value): def __init__(self, pathToPlist, key, value):
CommandBase.__init__(self)
assert pathToPlist is not None assert pathToPlist is not None
assert key is not None assert key is not None
assert value is not None assert value is not None

View File

@ -1,20 +0,0 @@
from commands.CommandBase import CommandBase
from utils.ManifestPatcher import ManifestPatcher
class PatchManifestCommand(CommandBase):
def __init__(self, pathToManifest, key, value):
CommandBase.__init__(self)
assert pathToManifest is not None
assert key is not None
assert value is not None
self.pathToManifest = pathToManifest
self.key = key
self.value = value
def execute(self):
patcher = ManifestPatcher(self.pathToManifest)
patcher.AddOrReplaceManifestAtr(self.key, self.value)

View File

@ -1,17 +1,14 @@
from commands.CommandBase import CommandBase
from utils.SlnPatcher import SlnPatcher from utils.SlnPatcher import SlnPatcher
class RemoveProjectCommand(CommandBase): class RemoveProjectCommand:
def __init__(self, slnPath, projectNames): def __init__(self, slnPath, projectName):
CommandBase.__init__(self)
assert slnPath is not None assert slnPath is not None
assert projectNames is not None assert projectName is not None
self.__slnPath = slnPath self.__slnPath = slnPath
self.projectNames = projectNames self.__projectName = projectName
def execute(self): def execute(self):
patcher = SlnPatcher(self.__slnPath) patcher = SlnPatcher(self.__slnPath)
patcher.removeProjects(self.projectNames) patcher.removeProjects([self.__projectName])

View File

@ -0,0 +1,11 @@
from subprocess import call
class ShCommand:
def __init__(self, commandText):
assert commandText is not None
self.__commandText = commandText
def execute(self):
call(self.__commandText, shell=True)

View File

@ -1,12 +0,0 @@
from commands.ShellCommandBase import ShellCommandBase
class ShTextCommand(ShellCommandBase):
def __init__(self, commandText):
ShellCommandBase.__init__(self)
assert commandText is not None
self.commandText = commandText
def execute(self):
self.executeShell(self.commandText)

View File

@ -1,16 +0,0 @@
from commands.CommandBase import CommandBase
from subprocess import call
class ShellCommandBase(CommandBase):
def __init__(self):
CommandBase.__init__(self)
def executeShell(self, commandText):
assert commandText is not None
retCode = call(commandText, shell=True)
if retCode != 0:
msg = 'problem with shell command: {0}'.format(commandText)
raise Exception(msg)

View File

@ -1,11 +1,8 @@
from commands.CommandBase import CommandBase
from utils.TestflightPublisher import TestFlightPublisher from utils.TestflightPublisher import TestFlightPublisher
class TestflightCommand(CommandBase): class TestflightCommand:
def __init__(self, pathToFile, api_token, team_token, notes): def __init__(self, pathToFile, api_token, team_token, notes):
CommandBase.__init__(self)
assert pathToFile is not None assert pathToFile is not None
self.__pathToFile = pathToFile self.__pathToFile = pathToFile

View File

@ -1,7 +1,6 @@
import re import re
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class CleanBuildParser(LineParser): class CleanBuildParser(LineParser):
@ -9,7 +8,7 @@ class CleanBuildParser(LineParser):
LineParser.__init__(self) LineParser.__init__(self)
assert commandToken is not None assert commandToken is not None
self.commandToken = commandToken self.__commandToken = commandToken
def parseLine(self, line): def parseLine(self, line):
assert line is not None assert line is not None
@ -17,8 +16,7 @@ class CleanBuildParser(LineParser):
filePathRegexp = r"'(?P<path>[./ a-zA-Z]+\.sln)'" filePathRegexp = r"'(?P<path>[./ a-zA-Z]+\.sln)'"
slnConfigRegexp = r"'(?P<config>[a-zA-Z|]+)'$" slnConfigRegexp = r"'(?P<config>[a-zA-Z|]+)'$"
rb = RegexpBuilder() regexpSource = self.startsWith(self.__commandToken) + filePathRegexp + self.keywordToken('for') + slnConfigRegexp
regexpSource = rb.startsWith(self.commandToken) + filePathRegexp + rb.keywordToken('for') + slnConfigRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)
@ -32,5 +30,5 @@ class CleanBuildParser(LineParser):
def isValidLine(self, line): def isValidLine(self, line):
assert line is not None assert line is not None
isValid = line.startswith(self.commandToken) isValid = line.startswith(self.__commandToken)
return isValid return isValid

View File

@ -2,7 +2,6 @@ import re
from parsers.CopyParser.CopyArguments import CopyArguments from parsers.CopyParser.CopyArguments import CopyArguments
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class CopyLineParser(LineParser): class CopyLineParser(LineParser):
@ -16,8 +15,7 @@ class CopyLineParser(LineParser):
srcFileNameRegexp = r"'(?P<src>[^']+)'" srcFileNameRegexp = r"'(?P<src>[^']+)'"
dstFileNameRegexp = r"'(?P<dst>[^']+)'$" dstFileNameRegexp = r"'(?P<dst>[^']+)'$"
rb = RegexpBuilder() regexpSource = self.startsWith('copy') + srcFileNameRegexp + self.keywordToken('to') + dstFileNameRegexp
regexpSource = rb.startsWith('copy') + srcFileNameRegexp + rb.keywordToken('to') + dstFileNameRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,6 +1,5 @@
import re import re
from parsers.InsideParser.InsideParserBase import InsideParserBase from parsers.InsideParser.InsideParserBase import InsideParserBase
from parsers.RegexpBuilder import RegexpBuilder
class InsideCsprojSetParser(InsideParserBase): class InsideCsprojSetParser(InsideParserBase):
@ -24,9 +23,8 @@ class InsideCsprojSetParser(InsideParserBase):
valueRegexp = r"'(?P<value>[^']+)'" valueRegexp = r"'(?P<value>[^']+)'"
slnConfigRegexp = r"'(?P<config>[a-zA-Z|]*)'$" slnConfigRegexp = r"'(?P<config>[a-zA-Z|]*)'$"
rb = RegexpBuilder() regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \ self.keywordToken('to') + valueRegexp + self.keywordToken('for') + slnConfigRegexp
rb.keywordToken('to') + valueRegexp + rb.keywordToken('for') + slnConfigRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -2,7 +2,9 @@ import abc
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
class InsideParserBase(LineParser): class InsideParserBase(object, LineParser):
__metaclass__ = abc.ABCMeta
def __init__(self, fileExt): def __init__(self, fileExt):
LineParser.__init__(self) LineParser.__init__(self)
@ -12,7 +14,7 @@ class InsideParserBase(LineParser):
@abc.abstractmethod @abc.abstractmethod
def getMatchInfo(self, line): def getMatchInfo(self, line):
# "Not implemented" "Not implemented"
return None, None return None, None
def fetchMatchFor(self, text): def fetchMatchFor(self, text):

View File

@ -1,7 +1,5 @@
import re import re
from parsers.InsideParser.InsideParserBase import InsideParserBase from parsers.InsideParser.InsideParserBase import InsideParserBase
from parsers.RegexpBuilder import RegexpBuilder
from parsers.ValuesStriper import ValuesStripper
class InsideRemoveParser(InsideParserBase): class InsideRemoveParser(InsideParserBase):
@ -12,33 +10,18 @@ class InsideRemoveParser(InsideParserBase):
match = self.fetchMatchFor(line) match = self.fetchMatchFor(line)
filePath = match.group('file') filePath = match.group('file')
projectNames = match.group('projects') projectName = match.group('project')
names = self.parseNames(projectNames) return filePath, projectName
result = {
'file_path': filePath,
'names': names
}
return result
def getMatchInfo(self, line): def getMatchInfo(self, line):
assert line is not None assert line is not None
filePathRegexp = r"'(?P<file>[./ a-zA-Z]+\.{0})'".format(self.fileExt) filePathRegexp = r"'(?P<file>[./ a-zA-Z]+\.{0})'".format(self.fileExt)
projectNameRegexp = r"'(?P<projects>[^']+)'" projectNameRegexp = r'(?P<project>[.a-zA-Z]+)'
rb = RegexpBuilder() regexpSource = self.startsWith('inside') + filePathRegexp + self.keywordToken('remove') + projectNameRegexp + self.spaceEndsWith('project')
regexpSource = rb.startsWith('inside') + filePathRegexp + rb.keywordToken('remove') + projectNameRegexp + \
rb.spaceEndsWith('project(s)?')
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)
return match, regexpSource return match, regexpSource
def parseNames(self, namesStr):
vs = ValuesStripper()
names = vs.strip(namesStr)
return names

View File

@ -1,7 +1,5 @@
import re import re
from parsers.InsideParser.InsideParserBase import InsideParserBase from parsers.InsideParser.InsideParserBase import InsideParserBase
from parsers.RegexpBuilder import RegexpBuilder
from parsers.ValuesStriper import ValuesStripper
class InsideSetArrayParser(InsideParserBase): class InsideSetArrayParser(InsideParserBase):
@ -27,9 +25,8 @@ class InsideSetArrayParser(InsideParserBase):
keyRegexp = r'(?P<key>[a-zA-Z]+)' keyRegexp = r'(?P<key>[a-zA-Z]+)'
valueRegexp = r"'(?P<values>[^']+)'$" valueRegexp = r"'(?P<values>[^']+)'$"
rb = RegexpBuilder() regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \ self.keywordToken('with') + self.than('values') + valueRegexp
rb.keywordToken('with') + rb.than('values') + valueRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)
@ -40,7 +37,5 @@ class InsideSetArrayParser(InsideParserBase):
assert valuesStr is not None assert valuesStr is not None
assert len(valuesStr) > 0 assert len(valuesStr) > 0
vs = ValuesStripper() values = valuesStr.split(':')
values = vs.strip(valuesStr)
return values return values

View File

@ -1,6 +1,5 @@
import re import re
from parsers.InsideParser.InsideParserBase import InsideParserBase from parsers.InsideParser.InsideParserBase import InsideParserBase
from parsers.RegexpBuilder import RegexpBuilder
class InsideSetParser(InsideParserBase): class InsideSetParser(InsideParserBase):
@ -19,12 +18,11 @@ class InsideSetParser(InsideParserBase):
def getMatchInfo(self, line): def getMatchInfo(self, line):
assert line is not None assert line is not None
keyRegexp = r'(?P<key>\S+)' keyRegexp = r'(?P<key>[a-zA-Z]+)'
valueRegexp = r"'(?P<value>[^']+)'$" valueRegexp = r"'(?P<value>[^']+)'$"
rb = RegexpBuilder() regexpSource = self.startsWith('inside') + self.filePathRegexp + self.keywordToken('set') + keyRegexp + \
regexpSource = rb.startsWith('inside') + self.filePathRegexp + rb.keywordToken('set') + keyRegexp + \ self.keywordToken('to') + valueRegexp
rb.keywordToken('to') + valueRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,18 +1,20 @@
import re import re
import os
from parsers.CopyParser.CopyArguments import CopyArguments
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class InstallProfileParser(LineParser): class InstallProfileParser(LineParser):
def __init__(self): def __init__(self):
LineParser.__init__(self) LineParser.__init__(self)
self.__copyArguments = CopyArguments()
self.__profileStorageDir = '~/Library/MobileDevice/Provisioning Profiles/'
def parseLine(self, line): def parseLine(self, line):
assert line is not None assert line is not None
rb = RegexpBuilder()
profilePathRegexp = r"'(?P<path>[^']+)'$" profilePathRegexp = r"'(?P<path>[^']+)'$"
regexpSource = rb.startsWith('install') + rb.than('profile') + profilePathRegexp regexpSource = self.startsWith('install') + self.than('profile') + profilePathRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
@ -20,13 +22,13 @@ class InstallProfileParser(LineParser):
self._guardMatch(match, line, regexpSource) self._guardMatch(match, line, regexpSource)
srcPath = match.group('path') srcPath = match.group('path')
return srcPath dstPath = self.getDestinationPath(srcPath)
def isValidLine(self, line): self.__copyArguments.setArguments(srcPath, dstPath)
rb = RegexpBuilder() return self.__copyArguments
regexpSource = rb.startsWith('install') + rb.than('profile') def getDestinationPath(self, sourcePath):
regexp = re.compile(regexpSource, re.UNICODE) profileFileName = os.path.basename(sourcePath)
destination = os.path.join(self.__profileStorageDir, profileFileName)
match = regexp.match(line) return destination
return match is not None

View File

@ -1,20 +1,35 @@
import abc
class LineParser: class LineParser:
__metaclass__ = abc.ABCMeta
def __init__(self): def __init__(self):
pass pass
@abc.abstractmethod
def parseLine(self, line): def parseLine(self, line):
assert line is not None
pass pass
@abc.abstractmethod
def isValidLine(self, line): def isValidLine(self, line):
assert line is not None
return False return False
def keywordToken(self, keyword):
assert keyword is not None
return r'\s+' + keyword + r'\s+'
def startsWith(self, keyword):
assert keyword is not None
return r'^' + keyword + r'\s+'
def spaceEndsWith(self, keyword):
assert keyword is not None
return r'\s+' + keyword + '$'
def endsWith(self, keyword):
assert keyword is not None
return keyword + '$'
def than(self, keyword):
assert keyword is not None
return keyword + r'\s+'
def _guardMatch(self, match_object, source, regexpSource = None): def _guardMatch(self, match_object, source, regexpSource = None):
if match_object is None: if match_object is None:
msg = 'Recognition exception: "{0}" for "{1}"'.format(source, regexpSource) msg = 'Recognition exception: "{0}" for "{1}"'.format(source, regexpSource)

View File

@ -1,7 +1,6 @@
import re import re
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class MakeDirsParser(LineParser): class MakeDirsParser(LineParser):
@ -11,8 +10,7 @@ class MakeDirsParser(LineParser):
def parseLine(self, line): def parseLine(self, line):
pathRegexp = r"'(?P<path>[^']+)'$" pathRegexp = r"'(?P<path>[^']+)'$"
rb = RegexpBuilder() regexpSource = self.startsWith('create dirs') + pathRegexp
regexpSource = rb.startsWith('create dirs') + pathRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,7 +1,6 @@
import re import re
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
from parsers.RegexpBuilder import RegexpBuilder
class CreateBackupParser(ParserBackupBase): class CreateBackupParser(ParserBackupBase):
@ -11,8 +10,7 @@ class CreateBackupParser(ParserBackupBase):
def getMatchInfo(self, line): def getMatchInfo(self, line):
assert line is not None assert line is not None
rb = RegexpBuilder() regexpSource = self.startsWith('create') + self.endsWith('backup')
regexpSource = rb.startsWith('create') + rb.endsWith('backup')
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,7 +1,6 @@
import re import re
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
from parsers.RegexpBuilder import RegexpBuilder
class DeleteBackupParser(ParserBackupBase): class DeleteBackupParser(ParserBackupBase):
@ -11,8 +10,7 @@ class DeleteBackupParser(ParserBackupBase):
def getMatchInfo(self, line): def getMatchInfo(self, line):
assert line is not None assert line is not None
rb = RegexpBuilder() regexpSource = self.startsWith('delete') + self.endsWith('backup')
regexpSource = rb.startsWith('delete') + rb.endsWith('backup')
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,7 +1,6 @@
import re import re
from parsers.ParserBackup.ParserBackupBase import ParserBackupBase from parsers.ParserBackup.ParserBackupBase import ParserBackupBase
from parsers.RegexpBuilder import RegexpBuilder
class RestoreBackupParser(ParserBackupBase): class RestoreBackupParser(ParserBackupBase):
@ -11,8 +10,7 @@ class RestoreBackupParser(ParserBackupBase):
def getMatchInfo(self, line): def getMatchInfo(self, line):
assert line is not None assert line is not None
rb = RegexpBuilder() regexpSource = self.startsWith('restore') + self.than('from') + self.endsWith('backup')
regexpSource = rb.startsWith('restore') + rb.than('from') + rb.endsWith('backup')
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,23 +0,0 @@
class RegexpBuilder:
def __init__(self):
pass
def keywordToken(self, keyword):
assert keyword is not None
return r'\s+' + keyword + r'\s+'
def startsWith(self, keyword):
assert keyword is not None
return r'^' + keyword + r'\s+'
def spaceEndsWith(self, keyword):
assert keyword is not None
return r'\s+' + keyword + '$'
def endsWith(self, keyword):
assert keyword is not None
return keyword + '$'
def than(self, keyword):
assert keyword is not None
return keyword + r'\s+'

View File

@ -26,41 +26,18 @@ class SettingsLineParser(LineParser):
return result return result
def isValidLine(self, line):
assert line is not None
return '=' in line
def splitToPathAndValue(self, line): def splitToPathAndValue(self, line):
# some.path = some_value
result = line.split('=')
propPath = self.getPropertyPath(result[0]) propPathRegexp = r"^(?P<prop_path>[\w.]+)"
value = self.getValue(result[1]) valueRegexp = "'(?P<value>.*)'"
return propPath, value regexpSource = propPathRegexp + r'\s*=\s*' + valueRegexp
regexp = re.compile(regexpSource, re.UNICODE)
def getPropertyPath(self, rawPropertyPath): match = regexp.match(line)
assert rawPropertyPath is not None self._guardMatch(match, line, regexpSource)
stripped = rawPropertyPath.strip()
propPathRegexp = r"^(?P<prop_path>[\w.]+)$"
regexp = re.compile(propPathRegexp, re.UNICODE)
match = regexp.match(stripped)
self._guardMatch(match, stripped, propPathRegexp)
propPath = match.group('prop_path') propPath = match.group('prop_path')
return propPath value = match.group('value')
def getValue(self, rawValue): return propPath, value
assert rawValue is not None
stripped = rawValue.strip()
old = stripped
stripped = stripped.strip("'")
if old == stripped:
stripped = stripped.strip('"')
return stripped

View File

@ -1,7 +1,6 @@
import re import re
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class ShParser(LineParser): class ShParser(LineParser):
@ -11,10 +10,9 @@ class ShParser(LineParser):
def parseLine(self, line): def parseLine(self, line):
assert line assert line
rb = RegexpBuilder()
cmdTextRegexp = r'(?P<text>.*)' cmdTextRegexp = r'(?P<text>.*)'
regexpSource = rb.startsWith('sh') + cmdTextRegexp regexpSource = self.startsWith('sh') + cmdTextRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
match = regexp.match(line) match = regexp.match(line)

View File

@ -1,40 +0,0 @@
import re
from parsers.LineParser import LineParser
from parsers.RegexpBuilder import RegexpBuilder
class SignApkParser(LineParser):
def __init__(self):
LineParser.__init__(self)
def parseLine(self, line):
assert line is not None
filePathRegexp = r"'(?P<path>[./ a-zA-Z]+\.sln)'"
slnConfigRegexp = r"'(?P<config>[a-zA-Z|]+)'"
projectRegexp = r"'(?P<project>[.a-zA-Z]+)'$"
rb = RegexpBuilder()
rSrc = rb.startsWith('sign') + rb.than('android') + filePathRegexp + rb.keywordToken('for') + slnConfigRegexp +\
rb.keywordToken('project') + projectRegexp
regexp = re.compile(rSrc, re.UNICODE)
match = regexp.match(line)
self._guardMatch(match, line, rSrc)
path = match.group('path')
slnConfig = match.group('config')
project = match.group('project')
return path, slnConfig, project
def isValidLine(self, line):
assert line is not None
rb = RegexpBuilder()
rSrc = rb.startsWith('sign') + rb.than('android')
regexp = re.compile(rSrc, re.UNICODE)
match = regexp.match(line)
return match is not None

View File

@ -1,7 +1,5 @@
from parsers.LineParser import LineParser from parsers.LineParser import LineParser
import re import re
from parsers.RegexpBuilder import RegexpBuilder
class TestflightParser(LineParser): class TestflightParser(LineParser):
def __init__(self): def __init__(self):
@ -10,17 +8,15 @@ class TestflightParser(LineParser):
def parseLine(self, line): def parseLine(self, line):
assert line is not None assert line is not None
rb = RegexpBuilder()
notesRegexp = r"'(?P<notes>[^']+)'" notesRegexp = r"'(?P<notes>[^']+)'"
apiTokenRegexp = r"'(?P<api_token>[^']+)'" apiTokenRegexp = r"'(?P<api_token>[^']+)'"
teamTokenRegexp = r"'(?P<team_token>[^']+)'" teamTokenRegexp = r"'(?P<team_token>[^']+)'"
filePathRegexp = r"'(?P<path>[^']+)'" filePathRegexp = r"'(?P<path>[^']+)'"
regexpSource = rb.startsWith('publish') + filePathRegexp + rb.keywordToken('to') + rb.than('testflight') + \ regexpSource = self.startsWith('publish') + filePathRegexp + self.keywordToken('to') + self.than('testflight') + \
rb.than('notes') + rb.than('=') + notesRegexp + \ self.than('notes') + self.than('=') + notesRegexp + \
rb.keywordToken('api_token') + rb.than('=') + apiTokenRegexp + \ self.keywordToken('api_token') + self.than('=') + apiTokenRegexp + \
rb.keywordToken('team_token') + rb.than('=') + teamTokenRegexp self.keywordToken('team_token') + self.than('=') + teamTokenRegexp
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)

View File

@ -1,13 +0,0 @@
class ValuesStripper:
def __init__(self, separator=':'):
assert separator is not None
self.separator = separator
def strip(self, valueStr):
assert valueStr is not None
rawValues = valueStr.split(self.separator)
values = [name.strip() for name in rawValues]
return values

View File

@ -24,6 +24,5 @@ print 'current working dir: {0}'.format(baseDirAbsPath)
#import Tests.ManualTests.install_profile #import Tests.ManualTests.install_profile
#import Tests.ManualTests.macros_include_test #import Tests.ManualTests.macros_include_test
#import Tests.ManualTests.resolve_settings #import Tests.ManualTests.resolve_settings
#import Tests.ManualTests.infoPlistMultipleValues_test
import Tests.ManualTests.manifest_test import Tests.ManualTests.infoPlistMultipleValues_test

View File

@ -1 +0,0 @@
sh echo 'This is default steps file'

View File

@ -26,18 +26,17 @@ scriptDir = os.path.dirname(scriptFilePath)
class TaskRunner: class TaskRunner:
def __init__(self, settingsProvider, fileContentProvider, buildConfigProvider, linePreprocessor, defaults): def __init__(self, settingsProvider, fileContentProvider, buildConfigProvider, linePreprocessor):
assert settingsProvider is not None assert settingsProvider is not None
assert fileContentProvider is not None assert fileContentProvider is not None
assert buildConfigProvider is not None assert buildConfigProvider is not None
assert linePreprocessor is not None assert linePreprocessor is not None
assert defaults is not None
self.settingsProvider = settingsProvider self.settingsProvider = settingsProvider
self.fileContentProvider = fileContentProvider self.fileContentProvider = fileContentProvider
self.configsProvider = buildConfigProvider self.configsProvider = buildConfigProvider
self.linePreprocessor = linePreprocessor self.linePreprocessor = linePreprocessor
self.defaults = defaults
macroProcessor = MacroProcessor() macroProcessor = MacroProcessor()
self.valueProvider = ValueProvider() self.valueProvider = ValueProvider()
@ -69,7 +68,7 @@ class TaskRunner:
stepsRunner.run(content) stepsRunner.run(content)
def getStepsContent(self, config): def getStepsContent(self, config):
pathToSteps = config.get('steps', self.defaults['steps']) pathToSteps = config['steps']
content = self.fileContentProvider.fetchContent(pathToSteps) content = self.fileContentProvider.fetchContent(pathToSteps)
content = self.textPreprocessor.processText(content, self.textPreprocessor) content = self.textPreprocessor.processText(content, self.textPreprocessor)
@ -78,18 +77,8 @@ class TaskRunner:
if __name__ == "__main__": if __name__ == "__main__":
defaults = {
'settings': 'settings.txt',
'builder_path': scriptDir,
'steps': os.path.join(scriptDir, 'steps.txt')
}
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--settings', required=False) overrideArgs = parser.parse_known_args()[1]
allArgs = parser.parse_known_args()
knownArgs = allArgs[0]
overrideArgs = allArgs[1]
# компоную препроцессор для индивидуальной обработки строк (удаление комментариев и ведущих пробельных символов) # компоную препроцессор для индивидуальной обработки строк (удаление комментариев и ведущих пробельных символов)
lineStripper = Stripper() lineStripper = Stripper()
@ -99,7 +88,7 @@ if __name__ == "__main__":
linePreprocessor.addProcessor(lineStripper) linePreprocessor.addProcessor(lineStripper)
# TODO: перенести в корень комапановки # TODO: перенести в корень комапановки
settingsPath = knownArgs.settings or defaults['settings'] settingsPath = 'scripts/settings.txt'
fromFileSettingsProvider = FromFileSettingsProvider(settingsPath, linePreprocessor) fromFileSettingsProvider = FromFileSettingsProvider(settingsPath, linePreprocessor)
overrideWithCmdSetProvider = CmdArgsOverriderSettingsProvider(fromFileSettingsProvider, overrideArgs, linePreprocessor) overrideWithCmdSetProvider = CmdArgsOverriderSettingsProvider(fromFileSettingsProvider, overrideArgs, linePreprocessor)
@ -107,10 +96,10 @@ if __name__ == "__main__":
buildConfigProvider = BuildConfigProvider() buildConfigProvider = BuildConfigProvider()
predefineBuildConfigProvider = PredefinedMacrosBuildConfigProvider(buildConfigProvider) predefineBuildConfigProvider = PredefinedMacrosBuildConfigProvider(buildConfigProvider)
predefineBuildConfigProvider.addPredefineMacro('builder_path', defaults['builder_path']) predefineBuildConfigProvider.addPredefineMacro('builder_path', scriptDir)
resolvedBuildConfigProvider = ResolvedBuildConfigProvider(predefineBuildConfigProvider) resolvedBuildConfigProvider = ResolvedBuildConfigProvider(predefineBuildConfigProvider)
runner = TaskRunner(overrideWithCmdSetProvider, fContentProvider, resolvedBuildConfigProvider, linePreprocessor, defaults) runner = TaskRunner(overrideWithCmdSetProvider, fContentProvider, resolvedBuildConfigProvider, linePreprocessor)
runner.run() runner.run()

View File

@ -1,16 +1,15 @@
import re import re
from parsers.RegexpBuilder import RegexpBuilder from parsers.LineParser import LineParser
class IncludeProcessor: class IncludeProcessor(LineParser):
def __init__(self): def __init__(self):
pass LineParser.__init__(self)
def getIncludesInfo(self, text): def getIncludesInfo(self, text):
assert text is not None assert text is not None
rb = RegexpBuilder() regexpSource = '<\s*' + self.than('include') + r"'[^']+'" + '\s*>'
regexpSource = '<\s*' + rb.than('include') + r"'[^']+'" + '\s*>'
regexp = re.compile(regexpSource, re.UNICODE) regexp = re.compile(regexpSource, re.UNICODE)
results = regexp.findall(text) results = regexp.findall(text)

View File

@ -1,55 +0,0 @@
from utils.XmlPatcher import XmlPatcher
class ManifestPatcher(XmlPatcher):
def __init__(self, manifestPath):
assert manifestPath is not None
XmlPatcher.__init__(self, manifestPath)
self.androidNs = "http://schemas.android.com/apk/res/android"
self.androidNsPrefix = 'android'
self.namespaces[self.androidNsPrefix] = self.androidNs
self.regNamespace(self.androidNsPrefix, self.androidNs)
def AddOrReplaceManifestAtr(self, rawAtrName, atrValue):
assert rawAtrName is not None
assert atrValue is not None
tree = self.parse()
manifestElement = tree.getroot()
name = self.fetchNameByRawName(rawAtrName)
manifestElement.set(name, atrValue)
self.write(tree)
def fetchNameByRawName(self, rawName):
nameInfo = self.parseRawName(rawName)
name = self.fetchName(nameInfo)
return name
def parseRawName(self, rawName):
"""rawName=(nsPrefix:)?OriginalName
"""
result = rawName.split(':')
prefixExists = len(result) > 1
nameInfo = {
'prefix': result[0] if prefixExists else None,
'original_name': result[1] if prefixExists else result[0]
}
return nameInfo
def fetchName(self, nameInfo):
assert nameInfo is not None
nsPrefix = nameInfo['prefix']
origName = nameInfo['original_name']
namespace = self.namespaces.get(nsPrefix, None)
name = self.getNameWithNs(origName, namespace) if nsPrefix else origName
return name

View File

@ -1,4 +1,3 @@
import os
from Core.SettingsProviderBase import SettingsProviderBase from Core.SettingsProviderBase import SettingsProviderBase
from parsers.SettingsParser.SettingsParser import SettingsParser from parsers.SettingsParser.SettingsParser import SettingsParser
@ -14,12 +13,6 @@ class FromFileSettingsProvider(SettingsProviderBase):
self.compositeLineProcessor = compositeLineProcessor self.compositeLineProcessor = compositeLineProcessor
def fetchSettings(self): def fetchSettings(self):
if not os.path.exists(self.pathToSettings):
raise Exception('settings file {0} not found'.format(self.pathToSettings))
if not os.path.isfile(self.pathToSettings):
raise Exception('{0} is not a file'.format(self.pathToSettings))
settingsFile = open(self.pathToSettings) settingsFile = open(self.pathToSettings)
content = settingsFile.read() content = settingsFile.read()

View File

@ -1,27 +0,0 @@
import xml.etree.ElementTree as eT
class XmlPatcher:
def __init__(self, path):
assert path is not None
self.path = path
self.namespaces = {}
def parse(self):
return eT.parse(self.path)
def write(self, tree):
tree.write(self.path, xml_declaration=True, encoding="UTF-8", method="xml")
def regNamespace(self, nsKey, nsValue):
assert nsKey is not None
assert nsValue is not None
eT.register_namespace(nsKey, nsValue)
def getNameWithNs(self, originalName, namespace):
assert originalName is not None
assert namespace is not None
# {someNamespace}OriginalName
return '{{{0}}}{1}'.format(namespace, originalName)

View File

@ -1,2 +0,0 @@
build '{@sln_path}' for '{@sln_config}'
sign android '{@sln_path}' for '{@sln_config}' project '{@csproj_name}'

View File

@ -1,9 +0,0 @@
inside '{@csproj_dir}/{@csproj_file_name}' set OutputPath to '{@output_path}' for '{@sln_config}|AnyCPU'
inside '{@csproj_dir}/{@csproj_file_name}' set AssemblyName to '{@project_name}' for ''
inside '{@csproj_dir}/Properties/AndroidManifest.xml' set package to '{@package_name}'
inside '{@csproj_dir}/Properties/AndroidManifest.xml' set android:versionName to '{@version}.{@build}'
inside '{@csproj_dir}/Properties/AndroidManifest.xml' set android:versionCode to '{@version_code}'
inside '{@sln_path}' remove '{@remove_project}' project
clean '{@sln_path}' for '{@sln_config}'

View File

@ -1 +0,0 @@
copy '{@csproj_dir}/{@output_path}/{@package_name}-Signed.apk' to '{@publish_path}/{@output_file_name}'

View File

@ -1,14 +0,0 @@
restore from backup
create backup
<include '{@builder_path}/scripts/common/android prepare.txt'>
<include '{@builder_path}/scripts/common/android build.txt'>
#if {@teamcity_build_id}
create dirs '{@publish_path}'
sh echo '{@teamcity_build_id}' > '{@publish_path}/../{@build}.build_id'
<include '{@builder_path}/scripts/common/android publish.txt'>
#endif
restore from backup
delete backup

View File

@ -1 +0,0 @@
build '{@sln_path}' for '{@sln_config}'

View File

@ -1,15 +0,0 @@
install profile 'scripts/{@provisioning_profile}.mobileprovision'
inside '{@csproj_dir}/{@csproj_file_name}' set CodesignKey to '{@provisioning_account}' for '{@sln_config}'
inside '{@csproj_dir}/{@csproj_file_name}' set CodesignProvision to '{@provisioning_uudid}' for '{@sln_config}'
inside '{@csproj_dir}/{@csproj_file_name}' set OutputPath to '{@output_path}' for '{@sln_config}'
inside '{@csproj_dir}/{@csproj_file_name}' set IpaPackageName to '{@output_file_format}' for '{@sln_config}'
inside '{@csproj_dir}/{@csproj_file_name}' set BuildIpa to 'true' for '{@sln_config}'
inside '{@csproj_dir}/{@csproj_file_name}' set AssemblyName to '{@project_name}' for ''
inside '{@csproj_dir}/Info.plist' set CFBundleIdentifier to '{@bundle_id}'
inside '{@csproj_dir}/Info.plist' set CFBundleVersion to '{@version}.{@build}'
inside '{@csproj_dir}/Info.plist' set CFBundleShortVersionString to '{@version}'
inside '{@sln_path}' remove '{@remove_project}' project
clean '{@sln_path}' for '{@sln_config}'

View File

@ -1 +0,0 @@
copy '{@csproj_dir}/{@output_path}/{@output_file_format}.ipa' to '{@publish_path}/{@output_file_name}'

View File

@ -1,2 +0,0 @@
sh rm -f '{@publish_path}/{@output_file_name}'
sh cd '{@csproj_dir}/{@output_path}' && zip -y -r '{@publish_path}/{@output_file_name}' '{@csproj_name}.app'

View File

@ -1,14 +0,0 @@
restore from backup
create backup
<include '{@builder_path}/scripts/common/ios prepare.txt'>
<include '{@builder_path}/scripts/common/ios build.txt'>
#if {@teamcity_build_id}
create dirs '{@publish_path}'
sh echo '{@teamcity_build_id}' > '{@publish_path}/../{@build}.build_id'
<include '{@builder_path}/scripts/common/ios publish {@publish_step_type}.txt'>
#endif
restore from backup
delete backup

Some files were not shown because too many files have changed in this diff Show More