Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ded9fa6231 |
|
|
@ -7,38 +7,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotCompileApp", "NotCompile
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DroidApp", "DroidApp\DroidApp.csproj", "{10AA179F-818F-4E3F-947E-DE1C0C87BB76}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Release|iPhone = Release|iPhone
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
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.Build.0 = Debug|iPhone
|
||||
{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}.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.Build.0 = Release|iPhoneSimulator
|
||||
{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|iPhoneSimulator.ActiveCfg = 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.Build.0 = Release|Any CPU
|
||||
{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
|
|
@ -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">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
|
@ -23,8 +23,7 @@
|
|||
<MtouchLink>None</MtouchLink>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchI18n>
|
||||
</MtouchI18n>
|
||||
<MtouchI18n />
|
||||
<MtouchArch>ARMv7</MtouchArch>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
|
|
@ -35,7 +34,7 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<CodesignProvision>MyProvisioningValue</CodesignProvision><CodesignKey>MyCodesignValue</CodesignKey></PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
|
|
@ -47,24 +46,21 @@
|
|||
<MtouchDebug>true</MtouchDebug>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<IpaPackageName>
|
||||
</IpaPackageName>
|
||||
<IpaPackageName />
|
||||
<CodesignProvision>F82B1481-F3D0-4CB5-AA6E-8B8D8E3A9DC1</CodesignProvision>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Output</OutputPath>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer: Рустам Заитов (CTL85FZX6K)</CodesignKey>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignProvision>8F606DAE-F9C9-4A19-8EFF-34B990D76C28</CodesignProvision>
|
||||
<IpaPackageName>
|
||||
</IpaPackageName>
|
||||
<MtouchI18n>
|
||||
</MtouchI18n>
|
||||
<IpaPackageName />
|
||||
<MtouchI18n />
|
||||
<MtouchArch>ARMv7</MtouchArch>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
</PropertyGroup>
|
||||
|
|
@ -74,6 +70,9 @@
|
|||
<Reference Include="System.Core" />
|
||||
<Reference Include="monotouch" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
</ItemGroup>
|
||||
|
|
@ -89,13 +88,4 @@
|
|||
<Name>Domain</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Content\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Content\Icons\icon-iphone-staging.png" />
|
||||
<BundleResource Include="Content\Icons\icon-iphone-staging%402x.png" />
|
||||
<BundleResource Include="Content\Icons\icon-iphone.png" />
|
||||
<BundleResource Include="Content\Icons\icon-iphone%402x.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -16,10 +16,5 @@
|
|||
<string>com.touchin.buildscript</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.0.0</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Content/Icons/icon-iphone@2x</string>
|
||||
<string>Content/Icons/icon-iphone</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
@ -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>
|
||||
|
|
@ -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++);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -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>
|
||||
|
|
@ -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("")]
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 |
|
|
@ -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>
|
||||
|
||||
|
|
@ -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>
|
||||
47
readme.txt
47
readme.txt
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from commands.CleanBuildCommands.BuildCommand import BuildCommand
|
||||
from commands.CleanBuildCommands.CleanCommand import CleanCommand
|
||||
from parsers.CleanBuildParser import CleanBuildParser
|
||||
from parser.CleanBuildParser import CleanBuildParser
|
||||
|
||||
|
||||
class CleanBuildCommandBuilder:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.CopyCommand import CopyCommand
|
||||
from parsers.CopyParser.CopyLineParser import CopyLineParser
|
||||
from parser.CopyParser.CopyLineParser import CopyLineParser
|
||||
|
||||
|
||||
class CopyCommandBuilder:
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
from commands.CreateBackupCommand import CreateBackupCommand
|
||||
from parser.BackupParser.CreateBackupParser import CreateBackupParser
|
||||
|
||||
|
||||
class CreateBackupCommandBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def isCreateBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = CreateBackupParser()
|
||||
return parser.isValidLine(line)
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = CreateBackupParser()
|
||||
backupArguments = parser.parseLine(line)
|
||||
|
||||
command = CreateBackupCommand(backupArguments)
|
||||
return command
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
from commands.DeleteBackupCommand import DeleteBackupCommand
|
||||
from parser.BackupParser.DeleteBackupParser import DeleteBackupParser
|
||||
|
||||
|
||||
class DeleteBackupCommandBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def isDeleteBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = DeleteBackupParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = DeleteBackupParser()
|
||||
parser.parseLine(line)
|
||||
|
||||
command = DeleteBackupCommand()
|
||||
return command
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
from commands.CopyCommand import CopyCommand
|
||||
from parser.InstallProfileParser import InstallProfileParser
|
||||
|
||||
|
||||
class InstallProfileCommandBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def isInstallProfile(self, line):
|
||||
assert line is not None
|
||||
|
||||
return line.startswith('install profile')
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = InstallProfileParser()
|
||||
cpArgs = parser.parseLine(line)
|
||||
|
||||
command = CopyCommand(cpArgs)
|
||||
return command
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.MakeDirsCommand import MakeDirsCommand
|
||||
from parsers.MakeDirsParser import MakeDirsParser
|
||||
from parser.MakeDirsParser import MakeDirsParser
|
||||
|
||||
|
||||
class MakeDirsCommandBuilder:
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
from commands.PatchCsprojCommand import PatchCsprojCommand
|
||||
from parser.InsideParser.InsideSetParser import InsideSetParser
|
||||
|
||||
|
||||
class PatchCsprojCommandBuilder:
|
||||
def __init__(self, config, valueProvider):
|
||||
assert config is not None
|
||||
assert valueProvider is not None
|
||||
|
||||
self.__config = config
|
||||
self.__valueProvider = valueProvider
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = InsideSetParser(self.__valueProvider, 'csproj')
|
||||
result = parser.parseLine(line)
|
||||
|
||||
csprojPath = result[0]
|
||||
key = result[1]
|
||||
value = self.__valueProvider.getValueFor(result[2])
|
||||
|
||||
slnConfig = self.__config['sln_config']
|
||||
|
||||
command = PatchCsprojCommand(csprojPath, key, value, slnConfig)
|
||||
return command
|
||||
|
||||
def isPatchCsproj(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = InsideSetParser(self.__valueProvider, 'csproj')
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.PatchInfoPlistCommand import PatchInfoPlistCommand
|
||||
from parsers.InsideParser.InsideSetParser import InsideSetParser
|
||||
from parser.InsideParser.InsideSetParser import InsideSetParser
|
||||
|
||||
|
||||
class PatchInfoplistCommandBuilder:
|
||||
|
|
@ -11,13 +11,13 @@ class PatchInfoplistCommandBuilder:
|
|||
def isPatchInfoPlist(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = self.createParser()
|
||||
parser = self.__createParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
parser = self.createParser()
|
||||
parser = self.__createParser()
|
||||
result = parser.parseLine(line)
|
||||
|
||||
path = result[0]
|
||||
|
|
@ -27,7 +27,7 @@ class PatchInfoplistCommandBuilder:
|
|||
command = PatchInfoPlistCommand(path, key, value)
|
||||
return command
|
||||
|
||||
def createParser(self):
|
||||
parser = InsideSetParser('plist')
|
||||
def __createParser(self):
|
||||
parser = InsideSetParser(self.__valueProvider, 'plist')
|
||||
return parser
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.RemoveProjectCommand import RemoveProjectCommand
|
||||
from parsers.InsideParser.InsideRemoveParser import InsideRemoveParser
|
||||
from parser.InsideParser.InsideRemoveParser import InsideRemoveParser
|
||||
|
||||
|
||||
class RemoveProjectCommandBuilder:
|
||||
|
|
@ -20,8 +20,8 @@ class RemoveProjectCommandBuilder:
|
|||
parser = InsideRemoveParser('sln')
|
||||
result = parser.parseLine(line)
|
||||
|
||||
slnPath = result['file_path']
|
||||
projectNames = result['names']
|
||||
slnPath = result[0]
|
||||
projectName = result[1]
|
||||
|
||||
command = RemoveProjectCommand(slnPath, projectNames)
|
||||
command = RemoveProjectCommand(slnPath, projectName)
|
||||
return command
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
from commands.RestoreBackupCommand import RestoreBackupCommand
|
||||
from parser.BackupParser.RestoreBackupParser import RestoreBackupParser
|
||||
|
||||
|
||||
class RestoreBackupCommandBuilder:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def isRestoreBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = RestoreBackupParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = RestoreBackupParser()
|
||||
parser.parseLine(line)
|
||||
|
||||
command = RestoreBackupCommand()
|
||||
return command
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.ShTextCommand import ShTextCommand
|
||||
from parsers.ShParser import ShParser
|
||||
from commands.ShCommand import ShCommand
|
||||
from parser.ShParser import ShParser
|
||||
|
||||
|
||||
class ShCommandBuilder:
|
||||
|
|
@ -19,5 +19,5 @@ class ShCommandBuilder:
|
|||
|
||||
cmdText = parser.parseLine(line)
|
||||
|
||||
command = ShTextCommand(cmdText)
|
||||
command = ShCommand(cmdText)
|
||||
return command
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from commands.TestflightCommand import TestflightCommand
|
||||
from parsers.TestflightParser import TestflightParser
|
||||
from parser.TestflightParser import TestflightParser
|
||||
|
||||
|
||||
class TestflightCommandBuilder:
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class FileContentProvider:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def fetchContent(self, path):
|
||||
file = open(path)
|
||||
content = file.read()
|
||||
|
||||
return content
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
class CommentRemover:
|
||||
def processText(self, line):
|
||||
assert line is not None
|
||||
|
||||
newLine = line
|
||||
index = line.find('#')
|
||||
if index >= 0:
|
||||
newLine = line[:index]
|
||||
|
||||
return newLine
|
||||
|
|
@ -1,17 +1,12 @@
|
|||
from Core.LineConveyor.PreprocessorBase import PreprocessorBase
|
||||
|
||||
|
||||
class MacroResolver(PreprocessorBase):
|
||||
class MacroResolver:
|
||||
def __init__(self, macroProcessor, valueProvider):
|
||||
PreprocessorBase.__init__(self)
|
||||
|
||||
assert macroProcessor is not None
|
||||
assert valueProvider is not None
|
||||
|
||||
self.macroProcessor = macroProcessor
|
||||
self.valueProvider = valueProvider
|
||||
|
||||
def processText(self, line, conveyorProcessor):
|
||||
def processText(self, line):
|
||||
assert line is not None
|
||||
|
||||
symbols = self.macroProcessor.getSymbols(line)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class Stripper:
|
||||
def processText(self, line):
|
||||
assert line is not None
|
||||
|
||||
return line.strip(' \t\n\r')
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
class TextConveyorPreprocessor:
|
||||
def __init__(self):
|
||||
self.processors = []
|
||||
|
||||
def addProcessor(self, processor):
|
||||
assert processor is not None
|
||||
|
||||
self.processors.append(processor)
|
||||
|
||||
def processText(self, text):
|
||||
assert text is not None
|
||||
|
||||
for processor in self.processors:
|
||||
text = processor.processText(text)
|
||||
|
||||
return text
|
||||
|
|
@ -1,17 +1,12 @@
|
|||
from Core.LineConveyor.PreprocessorBase import PreprocessorBase
|
||||
|
||||
|
||||
class TextInclude(PreprocessorBase):
|
||||
class TextInclude:
|
||||
def __init__(self, includeProcessor, contentProvider):
|
||||
PreprocessorBase.__init__(self)
|
||||
|
||||
assert includeProcessor is not None
|
||||
assert contentProvider is not None
|
||||
|
||||
self.includeProcessor = includeProcessor
|
||||
self.contentProvider = contentProvider
|
||||
|
||||
def processText(self, text, conveyorProcessor):
|
||||
def processText(self, text):
|
||||
assert text is not None
|
||||
includesInfo = self.includeProcessor.getIncludesInfo(text)
|
||||
|
||||
|
|
@ -20,8 +15,6 @@ class TextInclude(PreprocessorBase):
|
|||
path = info[1]
|
||||
|
||||
content = self.contentProvider.fetchContent(path)
|
||||
content = conveyorProcessor.processText(content, conveyorProcessor)
|
||||
|
||||
text = text.replace(includeStatement, content)
|
||||
|
||||
return text
|
||||
|
|
@ -1,18 +1,14 @@
|
|||
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.CopyCommandBuilder import CopyCommandBuilder
|
||||
from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder
|
||||
from CommandBuilders.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
|
||||
from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBuilder
|
||||
from CommandBuilders.MakeDirsCommandBuilder import MakeDirsCommandBuilder
|
||||
from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder
|
||||
from CommandBuilders.PatchInfoPlistArrayCommandBuilder import PatchInfoPlistArrayCommandBuilder
|
||||
from CommandBuilders.PatchInfoplistCommandBuilder import PatchInfoplistCommandBuilder
|
||||
from CommandBuilders.PatchManifestCommandBuilder import PatchManifestCommandBuilder
|
||||
from CommandBuilders.RemoveProjectCommandBuilder import RemoveProjectCommandBuilder
|
||||
from CommandBuilders.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
|
||||
from CommandBuilders.ShCommandBuilder import ShCommandBuilder
|
||||
from CommandBuilders.SignApkBuilder import SignApkCommandBuilder
|
||||
from CommandBuilders.TestflightCommandBuilder import TestflightCommandBuilder
|
||||
|
||||
|
||||
|
|
@ -27,34 +23,26 @@ class StepsRunner:
|
|||
|
||||
self.shCommandBuilder = ShCommandBuilder()
|
||||
self.removeProjectBuilder = RemoveProjectCommandBuilder()
|
||||
self.createBackupBuilder = CreateBackupCommandBuilder()
|
||||
self.restoreFromBackupBuilder = RestoreBackupCommandBuilder()
|
||||
self.deleteBackupBuilder = DeleteBackupCommandBuilder()
|
||||
self.createDirs = MakeDirsCommandBuilder()
|
||||
self.patchCsproj = PatchCsprojCommandBuilder()
|
||||
self.patchCsproj = PatchCsprojCommandBuilder(config, self.valueProvider)
|
||||
self.patchInfoPlist = PatchInfoplistCommandBuilder(self.valueProvider)
|
||||
self.patchInfoPlistArray = PatchInfoPlistArrayCommandBuilder()
|
||||
self.patchManifest = PatchManifestCommandBuilder()
|
||||
self.copyBuilder = CopyCommandBuilder()
|
||||
self.testflightBuilder = TestflightCommandBuilder()
|
||||
|
||||
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)
|
||||
self.installProfileBuilder = InstallProfileCommandBuilder()
|
||||
|
||||
buildUtilPath = config['build_tool']
|
||||
self.cleanBuilder = CleanBuildCommandBuilder(buildUtilPath, 'clean')
|
||||
self.buildBuilder = CleanBuildCommandBuilder(buildUtilPath, 'build')
|
||||
self.signAndroid = SignApkCommandBuilder(buildUtilPath)
|
||||
|
||||
def run(self, content):
|
||||
assert content is not None
|
||||
|
||||
lines = content.splitlines()
|
||||
for line in lines:
|
||||
processedLine = self.lineConveyor.processText(line, self.lineConveyor)
|
||||
processedLine = self.lineConveyor.processText(line)
|
||||
|
||||
if len(processedLine) == 0:
|
||||
continue
|
||||
|
|
@ -70,8 +58,6 @@ class StepsRunner:
|
|||
cmd = self.cleanBuilder.getCommandFor(line)
|
||||
elif self.buildBuilder.isCleanBuild(line):
|
||||
cmd = self.buildBuilder.getCommandFor(line)
|
||||
elif self.signAndroid.isSignApk(line):
|
||||
cmd = self.signAndroid.getCommandFor(line)
|
||||
elif self.createBackupBuilder.isCreateBackup(line):
|
||||
cmd = self.createBackupBuilder.getCommandFor(line)
|
||||
elif self.createDirs.isMakeDirsCommand(line):
|
||||
|
|
@ -80,10 +66,6 @@ class StepsRunner:
|
|||
cmd = self.patchCsproj.getCommandFor(line)
|
||||
elif self.patchInfoPlist.isPatchInfoPlist(line):
|
||||
cmd = self.patchInfoPlist.getCommandFor(line)
|
||||
elif self.patchInfoPlistArray.isPatchInfoPlist(line):
|
||||
cmd = self.patchInfoPlistArray.getCommandFor(line)
|
||||
elif self.patchManifest.isManifestCommand(line):
|
||||
cmd = self.patchManifest.getCommandFor(line)
|
||||
elif self.copyBuilder.isCopy(line):
|
||||
cmd =self.copyBuilder.getCommandFor(line)
|
||||
elif self.restoreFromBackupBuilder.isRestoreBackup(line):
|
||||
|
|
@ -98,6 +80,4 @@ class StepsRunner:
|
|||
msg = "unrecognised step. Line: '{0}'".format(line)
|
||||
raise Exception(msg)
|
||||
|
||||
print 'start: {0}'.format(line)
|
||||
cmd.execute()
|
||||
print 'finish: {0}'.format(line)
|
||||
|
|
@ -1,16 +1,10 @@
|
|||
restore from backup # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными)
|
||||
create backup
|
||||
restore from backup
|
||||
create backup for 'BuildSample'
|
||||
|
||||
sh echo 'Hello from setup.txt'
|
||||
|
||||
inside 'BuildSample/BuildSample.sln' remove 'NotCompileApp:DroidApp' project
|
||||
|
||||
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.sln' remove NotCompileApp project
|
||||
|
||||
inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output'
|
||||
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 CFBundleIconFiles with values '{@icons}'
|
||||
inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to 'CoolApp'
|
||||
|
||||
install profile 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision'
|
||||
|
|
@ -1,13 +1,16 @@
|
|||
<include 'scripts/{@setup_steps}'>
|
||||
sh echo hello from '{@author}'
|
||||
sh echo version: '{@version}'
|
||||
|
||||
<include 'scripts/IosSetupSteps.txt'>
|
||||
|
||||
clean 'BuildSample/BuildSample.sln' for '{@sln_config}'
|
||||
build 'BuildSample/BuildSample.sln' for '{@sln_config}'
|
||||
|
||||
create dirs 'Output/Appstore/Artifacts'
|
||||
copy 'BuildSample/BuildSample/Output/{@assembly_name}-{@version}.ipa' to 'Output/Appstore/Artifacts'
|
||||
copy 'BuildSample/BuildSample/Output/BuildSample-{@version}.ipa' to 'Output/Appstore/Artifacts'
|
||||
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/BuildSample-{@version}.ipa' to testflight notes = 'Hello' api_token = '{@tf_api_token}' team_token = '{@tf_team_token}'
|
||||
|
||||
restore from backup
|
||||
delete backup
|
||||
147
scripts/MANIFEST
147
scripts/MANIFEST
|
|
@ -1,78 +1,75 @@
|
|||
# file GENERATED by distutils, do NOT edit
|
||||
README.txt
|
||||
setup.py
|
||||
TouchinBuild/__init__.py
|
||||
TouchinBuild/taskRunner.py
|
||||
TouchinBuild/CommandBuilders/CleanBuildCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/CopyCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/CreateBackupCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/DeleteBackupCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/InstallProfileCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/MakeDirsCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/PatchCsprojCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/PatchInfoplistCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/RemoveProjectCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/RestoreBackupCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/ShCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/TestflightCommandBuilder.py
|
||||
TouchinBuild/CommandBuilders/__init__.py
|
||||
TouchinBuild/Core/FileContentProvider.py
|
||||
TouchinBuild/Core/StepsRunner.py
|
||||
TouchinBuild/Core/__init__.py
|
||||
TouchinBuild/Core/LineConveyor/CommentRemover.py
|
||||
TouchinBuild/Core/LineConveyor/MacroResolver.py
|
||||
TouchinBuild/Core/LineConveyor/Stripper.py
|
||||
TouchinBuild/Core/LineConveyor/TextConveyorPreprocessor.py
|
||||
TouchinBuild/Core/LineConveyor/TextInclude.py
|
||||
TouchinBuild/Core/LineConveyor/__init__.py
|
||||
TouchinBuild/commands/CopyCommand.py
|
||||
TouchinBuild/commands/CreateBackupCommand.py
|
||||
TouchinBuild/commands/DeleteBackupCommand.py
|
||||
TouchinBuild/commands/MakeDirsCommand.py
|
||||
TouchinBuild/commands/PatchCsprojCommand.py
|
||||
TouchinBuild/commands/PatchInfoPlistCommand.py
|
||||
TouchinBuild/commands/RemoveProjectCommand.py
|
||||
TouchinBuild/commands/RestoreBackupCommand.py
|
||||
TouchinBuild/commands/ShCommand.py
|
||||
TouchinBuild/commands/TestflightCommand.py
|
||||
TouchinBuild/commands/ValueProvider.py
|
||||
TouchinBuild/commands/__init__.py
|
||||
TouchinBuild/commands/CleanBuildCommands/BuildCommand.py
|
||||
TouchinBuild/commands/CleanBuildCommands/CleanBuildCommandBase.py
|
||||
TouchinBuild/commands/CleanBuildCommands/CleanCommand.py
|
||||
TouchinBuild/commands/CleanBuildCommands/__init__.py
|
||||
TouchinBuild/parsers/CleanBuildParser.py
|
||||
TouchinBuild/parsers/InstallProfileParser.py
|
||||
TouchinBuild/parsers/LineParser.py
|
||||
TouchinBuild/parsers/MakeDirsParser.py
|
||||
TouchinBuild/parsers/ShParser.py
|
||||
TouchinBuild/parsers/TestflightParser.py
|
||||
TouchinBuild/parsers/__init__.py
|
||||
TouchinBuild/parsers/CopyParser/CopyArguments.py
|
||||
TouchinBuild/parsers/CopyParser/CopyLineParser.py
|
||||
TouchinBuild/parsers/CopyParser/__init__.py
|
||||
TouchinBuild/parsers/InsideParser/InsideCsprojSetParser.py
|
||||
TouchinBuild/parsers/InsideParser/InsideRemoveParser.py
|
||||
TouchinBuild/parsers/InsideParser/InsideSetParser.py
|
||||
TouchinBuild/parsers/InsideParser/__init__.py
|
||||
TouchinBuild/parsers/ParserBackup/CreateBackupArguments.py
|
||||
TouchinBuild/parsers/ParserBackup/CreateBackupParser.py
|
||||
TouchinBuild/parsers/ParserBackup/DeleteBackupParser.py
|
||||
TouchinBuild/parsers/ParserBackup/RestoreBackupParser.py
|
||||
TouchinBuild/parsers/ParserBackup/__init__.py
|
||||
TouchinBuild/parsers/SettingsParser/PathParser.py
|
||||
TouchinBuild/parsers/SettingsParser/SettingsLineParser.py
|
||||
TouchinBuild/parsers/SettingsParser/SettingsMerger.py
|
||||
TouchinBuild/parsers/SettingsParser/SettingsParser.py
|
||||
TouchinBuild/parsers/SettingsParser/__init__.py
|
||||
TouchinBuild/utils/BuildConfigProvider.py
|
||||
TouchinBuild/utils/CsprojPatcher.py
|
||||
TouchinBuild/utils/IncludeProcessor.py
|
||||
TouchinBuild/utils/InfoPlistPatcher.py
|
||||
TouchinBuild/utils/MacroProcessor.py
|
||||
TouchinBuild/utils/SlnPatcher.py
|
||||
TouchinBuild/utils/TestflightPublisher.py
|
||||
TouchinBuild/utils/__init__.py
|
||||
TouchinBuild/utils/SettingsProvider/CmdArgsOverriderSettingsProvider.py
|
||||
TouchinBuild/utils/SettingsProvider/FromFileSettingsProvider.py
|
||||
TouchinBuild/utils/SettingsProvider/__init__.py
|
||||
CommandBuilders/CleanBuildCommandBuilder.py
|
||||
CommandBuilders/CopyCommandBuilder.py
|
||||
CommandBuilders/CreateBackupCommandBuilder.py
|
||||
CommandBuilders/DeleteBackupCommandBuilder.py
|
||||
CommandBuilders/InstallProfileCommandBuilder.py
|
||||
CommandBuilders/MakeDirsCommandBuilder.py
|
||||
CommandBuilders/PatchCsprojCommandBuilder.py
|
||||
CommandBuilders/PatchInfoplistCommandBuilder.py
|
||||
CommandBuilders/RemoveProjectCommandBuilder.py
|
||||
CommandBuilders/RestoreBackupCommandBuilder.py
|
||||
CommandBuilders/ShCommandBuilder.py
|
||||
CommandBuilders/TestflightCommandBuilder.py
|
||||
CommandBuilders/__init__.py
|
||||
Core/FileContentProvider.py
|
||||
Core/StepsRunner.py
|
||||
Core/__init__.py
|
||||
Core/LineConveyor/CommentRemover.py
|
||||
Core/LineConveyor/MacroResolver.py
|
||||
Core/LineConveyor/Stripper.py
|
||||
Core/LineConveyor/TextConveyorPreprocessor.py
|
||||
Core/LineConveyor/TextInclude.py
|
||||
Core/LineConveyor/__init__.py
|
||||
commands/CopyCommand.py
|
||||
commands/CreateBackupCommand.py
|
||||
commands/DeleteBackupCommand.py
|
||||
commands/MakeDirsCommand.py
|
||||
commands/PatchCsprojCommand.py
|
||||
commands/PatchInfoPlistCommand.py
|
||||
commands/RemoveProjectCommand.py
|
||||
commands/RestoreBackupCommand.py
|
||||
commands/ShCommand.py
|
||||
commands/TestflightCommand.py
|
||||
commands/ValueProvider.py
|
||||
commands/__init__.py
|
||||
commands/CleanBuildCommands/BuildCommand.py
|
||||
commands/CleanBuildCommands/CleanBuildCommandBase.py
|
||||
commands/CleanBuildCommands/CleanCommand.py
|
||||
commands/CleanBuildCommands/__init__.py
|
||||
parser/CleanBuildParser.py
|
||||
parser/InstallProfileParser.py
|
||||
parser/LineParser.py
|
||||
parser/MakeDirsParser.py
|
||||
parser/ShParser.py
|
||||
parser/TestflightParser.py
|
||||
parser/__init__.py
|
||||
parser/BackupParser/CreateBackupArguments.py
|
||||
parser/BackupParser/CreateBackupParser.py
|
||||
parser/BackupParser/DeleteBackupParser.py
|
||||
parser/BackupParser/RestoreBackupParser.py
|
||||
parser/BackupParser/__init__.py
|
||||
parser/CopyParser/CopyArguments.py
|
||||
parser/CopyParser/CopyLineParser.py
|
||||
parser/CopyParser/__init__.py
|
||||
parser/InsideParser/InsideRemoveParser.py
|
||||
parser/InsideParser/InsideSetParser.py
|
||||
parser/InsideParser/__init__.py
|
||||
parser/SettingsParser/PathParser.py
|
||||
parser/SettingsParser/SettingsLineParser.py
|
||||
parser/SettingsParser/SettingsMerger.py
|
||||
parser/SettingsParser/SettingsParser.py
|
||||
parser/SettingsParser/__init__.py
|
||||
utils/BuildConfigProvider.py
|
||||
utils/CsprojPatcher.py
|
||||
utils/IncludeProcessor.py
|
||||
utils/InfoPlistPatcher.py
|
||||
utils/MacroProcessor.py
|
||||
utils/SlnPatcher.py
|
||||
utils/TestflightPublisher.py
|
||||
utils/__init__.py
|
||||
utils/SettingsProvider/CmdArgsOverriderSettingsProvider.py
|
||||
utils/SettingsProvider/FromFileSettingsProvider.py
|
||||
utils/SettingsProvider/__init__.py
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
sh echo hello from '{@author}'
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder
|
||||
|
||||
line = "create backup for 'BuildSample'"
|
||||
|
||||
cmdBuilder = CreateBackupCommandBuilder()
|
||||
command = cmdBuilder.getCommandFor(line)
|
||||
|
||||
command.execute()
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
from CommandBuilders.PatchCsprojCommandBuilder import PatchCsprojCommandBuilder
|
||||
from commands.ValueProvider import ValueProvider
|
||||
|
||||
config = {'sln_config' : 'Release|iPhone'}
|
||||
line = "inside 'BuildSample/BuildSample/CoolApp.csproj' set OutputPath to 'Output'"
|
||||
|
||||
value_provider = ValueProvider(config)
|
||||
|
||||
builder = PatchCsprojCommandBuilder(config, value_provider)
|
||||
command = builder.getCommandFor(line)
|
||||
command.execute()
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
from CommandBuilders.DeleteBackupCommandBuilder import DeleteBackupCommandBuilder
|
||||
|
||||
line = "delete backup"
|
||||
|
||||
cmdBuilder = DeleteBackupCommandBuilder()
|
||||
command = cmdBuilder.getCommandFor(line)
|
||||
|
||||
command.execute()
|
||||
|
|
@ -12,8 +12,7 @@ config = {
|
|||
}
|
||||
line = "inside 'BuildSample/BuildSample/Info.plist' set CFBundleDisplayName to 'MyCoolApp'"
|
||||
|
||||
value_provider = ValueProvider()
|
||||
value_provider.setConfig(config)
|
||||
value_provider = ValueProvider(config)
|
||||
builder = PatchInfoplistCommandBuilder(value_provider)
|
||||
|
||||
command = builder.getCommandFor(line)
|
||||
|
|
@ -2,7 +2,7 @@ from CommandBuilders.InstallProfileCommandBuilder import InstallProfileCommandBu
|
|||
|
||||
line = "install profile 'BuildSample/BuildSample/Profiles/8F606DAE-F9C9-4A19-8EFF-34B990D76C28.mobileprovision'"
|
||||
|
||||
builder = InstallProfileCommandBuilder('BsProject')
|
||||
builder = InstallProfileCommandBuilder()
|
||||
command = builder.getCommandFor(line)
|
||||
|
||||
command.execute()
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
from CommandBuilders.RestoreBackupCommandBuilder import RestoreBackupCommandBuilder
|
||||
|
||||
line = "restore from backup"
|
||||
|
||||
builder = RestoreBackupCommandBuilder()
|
||||
command = builder.getCommandFor(line)
|
||||
|
||||
command.execute()
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
from commands.ShCommand import ShCommand
|
||||
|
||||
calendarCommand = ShCommand('cal 12 2013')
|
||||
calendarCommand.execute()
|
||||
|
||||
touchCommand = ShCommand('touch ../tmp.txt')
|
||||
touchCommand.execute()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from utils.BuildConfigProvider.BuildConfigProvider import BuildConfigProvider
|
||||
from utils.BuildConfigProvider import BuildConfigProvider
|
||||
|
||||
|
||||
class TestBuildConfigProvider(unittest.TestCase):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.CleanBuildParser import CleanBuildParser
|
||||
from parser.CleanBuildParser import CleanBuildParser
|
||||
|
||||
|
||||
class TestCleanBuildParser(unittest.TestCase):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.CopyParser.CopyArguments import CopyArguments
|
||||
from parser.CopyParser.CopyArguments import CopyArguments
|
||||
|
||||
|
||||
class TestCopyArguments(unittest.TestCase):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.CopyParser.CopyLineParser import CopyLineParser
|
||||
from parser.CopyParser.CopyLineParser import CopyLineParser
|
||||
|
||||
|
||||
class TestCopyParser(unittest.TestCase):
|
||||
|
|
@ -3,7 +3,6 @@ from Core.LineConveyor.TextInclude import TextInclude
|
|||
from utils.IncludeProcessor import IncludeProcessor
|
||||
|
||||
|
||||
#noinspection PyUnusedLocal
|
||||
class MockContentProvider:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
|
@ -27,7 +26,7 @@ another bla
|
|||
<include 'paht2'>
|
||||
yet another bla"""
|
||||
|
||||
processedText = self.includeText.processText(text, self.includeText)
|
||||
processedText = self.includeText.processText(text)
|
||||
|
||||
expected = """
|
||||
bla bla
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import unittest
|
||||
from parser.InstallProfileParser import InstallProfileParser
|
||||
|
||||
|
||||
class TestInstallProfile(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.parser = InstallProfileParser()
|
||||
|
||||
def test_parse(self):
|
||||
line = "install profile 'Path/To/Profile.mobileprovision'"
|
||||
copyArgs = self.parser.parseLine(line)
|
||||
|
||||
self.assertEqual('Path/To/Profile.mobileprovision', copyArgs.source)
|
||||
self.assertEqual('~/Library/MobileDevice/Provisioning Profiles/Profile.mobileprovision', copyArgs.target)
|
||||
|
|
@ -8,12 +8,12 @@ class TestCommentRemover(unittest.TestCase):
|
|||
|
||||
def test_startsWithComment(self):
|
||||
line = '# this line is comment'
|
||||
newLine = self.commentRemover.processText(line, None)
|
||||
newLine = self.commentRemover.processText(line)
|
||||
|
||||
self.assertEqual('', newLine)
|
||||
|
||||
def test_containsComment(self):
|
||||
line = 'this line contains # a comment'
|
||||
newLine = self.commentRemover.processText(line, None)
|
||||
newLine = self.commentRemover.processText(line)
|
||||
|
||||
self.assertEqual('this line contains ', newLine)
|
||||
|
|
@ -21,6 +21,6 @@ class TestMacroResolver(unittest.TestCase):
|
|||
|
||||
def test_resolveLine(self):
|
||||
line = '{@key1} bla {@some_name} version: {@version}'
|
||||
newLine = self.macroResolver.processText(line, self.macroResolver)
|
||||
newLine = self.macroResolver.processText(line)
|
||||
|
||||
self.assertEqual('hello world bla another name version: 1.2.3', newLine)
|
||||
|
|
@ -8,6 +8,6 @@ class TestStripper(unittest.TestCase):
|
|||
|
||||
def test_stripLine(self):
|
||||
line = ' \tSome text \t\r\n'
|
||||
newLine = self.stripper.processText(line, self.stripper)
|
||||
newLine = self.stripper.processText(line)
|
||||
|
||||
self.assertEqual('Some text', newLine)
|
||||
|
|
@ -15,20 +15,6 @@ class TestMacro(unittest.TestCase):
|
|||
self.assertTrue('@my_macro' in symbols)
|
||||
self.assertTrue('@macro_with_numbers123' in symbols)
|
||||
|
||||
def test_parseMacroInsideInclude(self):
|
||||
line = "<include '{@path_to_file}'>"
|
||||
symbols = self.macroParser.getSymbols(line)
|
||||
|
||||
self.assertTrue('@path_to_file' in symbols)
|
||||
|
||||
def test_parseMacroInsideIncludeWithDirSeparator(self):
|
||||
line = "<include '{@parent_folder}/{@folder}/{@file_name}'>"
|
||||
symbols = self.macroParser.getSymbols(line)
|
||||
|
||||
self.assertTrue('@parent_folder' in symbols)
|
||||
self.assertTrue('@folder' in symbols)
|
||||
self.assertTrue('@file_name' in symbols)
|
||||
|
||||
def test_getName(self):
|
||||
line = '{@macro_name}'
|
||||
name = self.macroParser.getMacroName(line)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.MakeDirsParser import MakeDirsParser
|
||||
from parser.MakeDirsParser import MakeDirsParser
|
||||
|
||||
|
||||
class TestMakeDirsParser(unittest.TestCase):
|
||||
|
|
@ -1,16 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from parsers.InsideParser.InsideCsprojSetParser import InsideCsprojSetParser
|
||||
from commands.ValueProvider import ValueProvider
|
||||
from parser.InsideParser.InsideSetParser import InsideSetParser
|
||||
|
||||
|
||||
class TestCsprojParser(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.parser = InsideCsprojSetParser('csproj')
|
||||
value_provider = ValueProvider()
|
||||
self.parser = InsideSetParser(value_provider, 'csproj')
|
||||
|
||||
|
||||
def test_isValid(self):
|
||||
line = "inside 'CoolApp.csproj' set KEY to 'VALUE' for 'Sln|Config'"
|
||||
line = "inside 'CoolApp.csproj' set KEY to 'VALUE'"
|
||||
isValid = self.parser.isValidLine(line)
|
||||
|
||||
self.assertEqual(True, isValid)
|
||||
|
|
@ -22,10 +24,9 @@ class TestCsprojParser(unittest.TestCase):
|
|||
self.assertEqual(False, isValid)
|
||||
|
||||
def test_parse(self):
|
||||
line = "inside 'Dir/../Some Folder/CoolApp.csproj' set OutputPath to 'Output' for 'Release|iPhone'"
|
||||
line = "inside 'Dir/../Some Folder/CoolApp.csproj' set OutputPath to 'Output'"
|
||||
result = self.parser.parseLine(line)
|
||||
|
||||
self.assertEqual('Dir/../Some Folder/CoolApp.csproj', result[0])
|
||||
self.assertEqual('OutputPath', result[1])
|
||||
self.assertEqual('Output', result[2])
|
||||
self.assertEqual('Release|iPhone', result[3])
|
||||
self.assertEqual('Output', result[2])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.SettingsParser.PathParser import PathParser
|
||||
from parser.SettingsParser.PathParser import PathParser
|
||||
|
||||
|
||||
class TestPathParser(unittest.TestCase):
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from parser.SettingsParser.SettingsLineParser import SettingsLineParser
|
||||
|
||||
|
||||
class TestSettingsLineParser(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.parser = SettingsLineParser()
|
||||
|
||||
def test_getPathAndValue(self):
|
||||
line = "abc.123.some_name = 'crazy value ±~ ../ 123'"
|
||||
result = self.parser.splitToPathAndValue(line)
|
||||
|
||||
self.assertEqual('abc.123.some_name', result[0])
|
||||
self.assertEqual('crazy value ±~ ../ 123', result[1])
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from Core.LineConveyor.NullPreprocessor import NullPreprocessor
|
||||
from parsers.SettingsParser.SettingsParser import SettingsParser
|
||||
from parser.SettingsParser.SettingsParser import SettingsParser
|
||||
|
||||
|
||||
|
||||
class TestSettingsParser(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.preprocessor = NullPreprocessor()
|
||||
self.parser = SettingsParser(self.preprocessor, None)
|
||||
self.parser = SettingsParser()
|
||||
|
||||
def test_processLine(self):
|
||||
line1 = "x.y.name1 = 'value1'"
|
||||
|
|
@ -41,16 +38,15 @@ class TestSettingsParser(unittest.TestCase):
|
|||
self.assertEqual('value8', self.parser.settings['a']['z']['name2'])
|
||||
|
||||
def test_emptyLinesAndComments(self):
|
||||
|
||||
class PartialSettingsParser(SettingsParser):
|
||||
def __init__(self, textPreprocessor):
|
||||
SettingsParser.__init__(self, textPreprocessor, None)
|
||||
def __init__(self):
|
||||
SettingsParser.__init__(self)
|
||||
self.processLineCall = 0
|
||||
|
||||
def processLine(self, line):
|
||||
self.processLineCall += 1
|
||||
|
||||
self.parser = PartialSettingsParser(self.preprocessor)
|
||||
self.parser = PartialSettingsParser()
|
||||
content = """
|
||||
valid.line.with.setting = 'some value'
|
||||
# this is comment
|
||||
|
|
@ -60,9 +56,7 @@ valid.line.with.setting = 'some value'
|
|||
|
||||
self.parser.parse(content)
|
||||
|
||||
# всего 6 строк, 2 из которых пустые
|
||||
# NullPreprocessor не уберет комментарии, поэтому будет 4 вызова processLine
|
||||
self.assertEqual(4, self.parser.processLineCall)
|
||||
self.assertEqual(2, self.parser.processLineCall)
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from parsers.ShParser import ShParser
|
||||
from parser.ShParser import ShParser
|
||||
|
||||
|
||||
class TestShParser(unittest.TestCase):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from parsers.TestflightParser import TestflightParser
|
||||
from parser.TestflightParser import TestflightParser
|
||||
|
||||
|
||||
class TesttestflightParser(unittest.TestCase):
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Запуск всех тестов
|
||||
python -m unittest discover -s Tests/UnitTests/
|
||||
|
||||
Запуск части тестов
|
||||
python -m unittest discover -s Tests/UnitTests/CopyParser/
|
||||
|
|
@ -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 = []
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
|
||||
from commands.BaseBackupCommand.CreateBackupCommand import CreateBackupCommand
|
||||
from parsers.ParserBackup.CreateBackupParser import CreateBackupParser
|
||||
|
||||
|
||||
class CreateBackupCommandBuilder(BaseBackupCommandBuilder):
|
||||
def __init__(self, ignoreBackupStr):
|
||||
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr)
|
||||
|
||||
def isCreateBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = CreateBackupParser()
|
||||
return parser.isValidLine(line)
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = CreateBackupParser()
|
||||
parser.parseLine(line)
|
||||
|
||||
command = CreateBackupCommand(self.ignoreBackup)
|
||||
return command
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
|
||||
from commands.BaseBackupCommand.DeleteBackupCommand import DeleteBackupCommand
|
||||
from parsers.ParserBackup.DeleteBackupParser import DeleteBackupParser
|
||||
|
||||
|
||||
class DeleteBackupCommandBuilder(BaseBackupCommandBuilder):
|
||||
def __init__(self, ignoreBackupStr):
|
||||
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr)
|
||||
|
||||
def isDeleteBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = DeleteBackupParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = DeleteBackupParser()
|
||||
parser.parseLine(line)
|
||||
|
||||
command = DeleteBackupCommand(self.ignoreBackup)
|
||||
return command
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
from CommandBuilders.BuilderBackupCommands.BaseBackupCommandBuilder import BaseBackupCommandBuilder
|
||||
from commands.BaseBackupCommand.RestoreBackupCommand import RestoreBackupCommand
|
||||
from parsers.ParserBackup.RestoreBackupParser import RestoreBackupParser
|
||||
|
||||
|
||||
class RestoreBackupCommandBuilder(BaseBackupCommandBuilder):
|
||||
def __init__(self, ignoreBackupStr):
|
||||
BaseBackupCommandBuilder.__init__(self, ignoreBackupStr)
|
||||
|
||||
def isRestoreBackup(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = RestoreBackupParser()
|
||||
isValid = parser.isValidLine(line)
|
||||
|
||||
return isValid
|
||||
|
||||
def getCommandFor(self, line):
|
||||
assert line is not None
|
||||
|
||||
parser = RestoreBackupParser()
|
||||
parser.parseLine(line)
|
||||
|
||||
command = RestoreBackupCommand(self.ignoreBackup)
|
||||
return command
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue