-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
179 changed files
with
7,479 additions
and
6,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
language: csharp | ||
os: | ||
- linux | ||
- osx | ||
|
||
# OS-X поддерживать некому | ||
matrix: | ||
allow_failures: | ||
os: osx | ||
|
||
sudo: required | ||
dotnet: 2.0.0 | ||
solution: src/1Script_Mono.sln | ||
install: | ||
- wget oscript.io/Downloads/latest/deb && sudo dpkg -i deb | ||
- sudo opm install oscript-config | ||
- sudo opm install logos | ||
- sudo opm install asserts | ||
- dotnet restore ${TRAVIS_SOLUTION} /p:Configuration=Release /p:Platform=x86 | ||
- nuget restore ${TRAVIS_SOLUTION} | ||
script: | ||
- install/build.sh | ||
- echo "lib.system=${PWD}/oscript-library/src" > src/oscript/bin/Release/oscript.cfg | ||
- ./travis-runtests.sh src/oscript/bin/Release/ | ||
- msbuild ${TRAVIS_SOLUTION} /p:Configuration="Release" /p:Platform="x86" | ||
- echo "lib.system=`oscript-config get lib.system`" > src/oscript/bin/x86/Release/net452/oscript.cfg | ||
- ./travis-runtests.sh src/oscript/bin/x86/Release/net452 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> | ||
|
||
<PropertyGroup> | ||
<ReleaseNumber Condition="'$(ReleaseNumber)' == ''">20</ReleaseNumber> | ||
<BuildNumber Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildNumber> | ||
<BuildNumber Condition="'$(BUILD_NUMBER)' == ''">0</BuildNumber> | ||
|
||
<ArtifactsRoot>$(MSBuildProjectDirectory)/built</ArtifactsRoot> | ||
<Solution>$(MSBuildProjectDirectory)/src/1Script.sln</Solution> | ||
<Configuration>Release</Configuration> | ||
<Platform>x86</Platform> | ||
</PropertyGroup> | ||
|
||
<Target Name="CleanAll"> | ||
|
||
<ItemGroup> | ||
<TestsResults Include="$(MSBuildProjectDirectory)/tests/*.os.xml" /> | ||
</ItemGroup> | ||
|
||
<Delete Files="@(TestsResults)" /> | ||
<DeleteTree Directories="$(ArtifactsRoot)" Condition="Exists($(ArtifactsRoot))" /> | ||
|
||
<MSBuild Projects="$(Solution)" Targets="Clean" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=$(Platform)"/> | ||
|
||
</Target> | ||
|
||
<Target Name="Make"> | ||
<MSBuild Projects="$(Solution)" Targets="restore;Build" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=$(Platform)"/> | ||
</Target> | ||
|
||
<Target Name="CreateDistributions" DependsOnTargets="CreateInstaller;CreateNuget;CreateZip"> | ||
<ItemGroup> | ||
<TempContent Include="$(ArtifactsRoot)/tmp"/> | ||
<TempContent Include="$(MDDocFolder)"/> | ||
</ItemGroup> | ||
<DeleteTree Directories="@(TempContent)"/> | ||
</Target> | ||
|
||
<Target Name="PrepareArtifactsRoot"> | ||
<PropertyGroup> | ||
<TempFolder>$(ArtifactsRoot)/tmp</TempFolder> | ||
<BinFolder>$(TempFolder)/bin</BinFolder> | ||
<LibFolder>$(TempFolder)/lib</LibFolder> | ||
<ExamplesFolder>$(TempFolder)/examples</ExamplesFolder> | ||
<DocFolder>$(TempFolder)/doc</DocFolder> | ||
<DebugDest>$(ArtifactsRoot)\vscode\</DebugDest> | ||
<MDDocFolder>$(ArtifactsRoot)/mddoc</MDDocFolder> | ||
</PropertyGroup> | ||
<MakeDir Directories="$(ArtifactsRoot)" /> | ||
<MakeDir Directories="$(TempFolder)" /> | ||
</Target> | ||
|
||
<Target Name="PrepareDistributionContent"> | ||
|
||
<CallTarget Targets="GatherBinaries" /> | ||
<CallTarget Targets="GatherLibrary" /> | ||
<CallTarget Targets="GatherExamples" /> | ||
<CallTarget Targets="GatherDocuments" Condition=" '$(OneScriptDocumenter)' != '' "/> | ||
|
||
</Target> | ||
|
||
<!-- Собирает отовсюду содержимое папки bin --> | ||
<Target Name="GatherBinaries" DependsOnTargets="Make;PrepareArtifactsRoot"> | ||
<MakeDir Directories="$(BinFolder)" /> | ||
|
||
<ItemGroup> | ||
<BuiltProjects Include="oscript" /> | ||
<BuiltProjects Include="TestApp" /> | ||
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/x86/$(Configuration)/net452/**"/> | ||
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/ASPNETHandler/bin/$(Configuration)/net452/ASPNETHandler.dll"/> | ||
</ItemGroup> | ||
|
||
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinFolder)" /> | ||
<!-- Копирование скрипта запуска для opm --> | ||
<Copy SourceFiles="$(MSBuildProjectDirectory)\install\opm.bat" DestinationFolder="$(BinFolder)"/> | ||
|
||
<PropertyGroup> | ||
<DebugSrc>$(MSBuildProjectDirectory)/src/DebugServer/bin/$(Configuration)/net452</DebugSrc> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<DbgBinFiles Include="$(DebugSrc)/*.dll"/> | ||
<DbgBinFiles Include="$(DebugSrc)/*.exe"/> | ||
<DbgBinFiles Include="$(DebugSrc)/*.config"/> | ||
<DbgPackageFiles Include="$(DebugSrc)/README.md"/> | ||
<DbgPackageFiles Include="$(DebugSrc)/package.json"/> | ||
<DbgImageFiles Include="$(DebugSrc)/images/**"/> | ||
</ItemGroup> | ||
|
||
<Copy SourceFiles="@(DbgBinFiles)" DestinationFolder="$(DebugDest)/bin"/> | ||
<Copy SourceFiles="@(DbgPackageFiles)" DestinationFolder="$(DebugDest)"/> | ||
<Copy SourceFiles="@(DbgImageFiles)" DestinationFolder="$(DebugDest)/images"/> | ||
|
||
</Target> | ||
|
||
<!-- Собирает в целевой папке содержимое папки lib --> | ||
<Target Name="GatherLibrary" DependsOnTargets="Make;PrepareArtifactsRoot"> | ||
|
||
<MakeDir Directories="$(LibFolder)" /> | ||
<Exec Command=""$(BinFolder)/oscript.exe" "$(MSBuildProjectDirectory)\install\unicode-zipper.os" unpack "$(MSBuildProjectDirectory)\install\opm-0.13.0.ospx" "$(LibFolder)\tmp""/> | ||
<Exec Command=""$(BinFolder)/oscript.exe" "$(MSBuildProjectDirectory)\install\unicode-zipper.os" unpack "$(LibFolder)\tmp\content.zip" "$(LibFolder)/opm""/> | ||
<Copy SourceFiles="$(MSBuildProjectDirectory)\install\package-loader.os" DestinationFolder="$(LibFolder)"/> | ||
<DeleteTree Directories="$(LibFolder)\tmp"/> | ||
|
||
<CallTarget Targets="InstallStdLib" Condition="'$(StandardLibraryPacks)' != ''"/> | ||
|
||
</Target> | ||
|
||
<!-- Копирует поставляемые файлы stdlib, если они есть на машине сборки --> | ||
<Target Name="InstallStdLib"> | ||
<ItemGroup> | ||
<LibraryFiles Include="$(StandardLibraryPacks)\**\*" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(LibFolder)\%(RecursiveDir)"/> | ||
</Target> | ||
|
||
<!-- Собирает в целевой папке содержимое папки examples --> | ||
<Target Name="GatherExamples" DependsOnTargets="PrepareArtifactsRoot"> | ||
<ItemGroup> | ||
<ExampleFiles Include="$(MSBuildProjectDirectory)\install\examples\**\*"/> | ||
</ItemGroup> | ||
<MakeDir Directories="$(ExamplesFolder)" /> | ||
<Copy SourceFiles="@(ExampleFiles)" DestinationFolder="$(ExamplesFolder)\%(RecursiveDir)"/> | ||
</Target> | ||
|
||
<!-- Собирает в целевой папке содержимое папки doc --> | ||
<Target Name="GatherDocuments" DependsOnTargets="PrepareArtifactsRoot;GenerateDocs"> | ||
<MakeDir Directories="$(DocFolder)"/> | ||
<Exec Command="$(OneScriptDocumenter) html $(TMP)\tempdoc.xml "$(DocFolder)""/> | ||
</Target> | ||
|
||
<!-- Генерирует необходимую документацию --> | ||
<Target Name="GenerateDocs"> | ||
|
||
<Exec Command="$(OneScriptDocumenter) $(TMP)\tempdoc.xml "$(BinFolder)\ScriptEngine.dll" "$(BinFolder)\ScriptEngine.HostedScript.dll" "$(BinFolder)\oscript.exe""/> | ||
<MakeDir Directories="$(MDDocFolder)"/> | ||
<Exec Command="$(OneScriptDocumenter) markdown $(TMP)\tempdoc.xml "$(MDDocFolder)" /syntax/page"/> | ||
|
||
</Target> | ||
|
||
<!-- Чистка промежуточных файлов --> | ||
<Target Name="CleanIntermediates" AfterTargets="PrepareDistributionContent"> | ||
<ItemGroup> | ||
<ExcludedArtifacts Include="$(BinFolder)/*.pdb" /> | ||
<ExcludedArtifacts Include="$(BinFolder)/*.xml" /> | ||
<!-- остается от документера. Надо починить его чтобы писал куда-то в другое место --> | ||
<ExcludedArtifacts Include="$(MSBuildProjectDirectory)/map.json"/> | ||
</ItemGroup> | ||
<Delete Files="@(ExcludedArtifacts)"/> | ||
</Target> | ||
|
||
<!-- Инсталлятор --> | ||
<Target Name="CreateInstaller" DependsOnTargets="PrepareArtifactsRoot"> | ||
<Error Text="No installer path is specified" Condition="'$(InnoSetupPath)' == ''"/> | ||
<PropertyGroup> | ||
<InstallerStandardPath>"$(InnoSetupPath)\iscc.exe"</InstallerStandardPath> | ||
<DistPath>$(ArtifactsRoot)</DistPath> | ||
</PropertyGroup> | ||
<Exec Command="$(InstallerStandardPath) "$(MSBuildProjectDirectory)\install\install.iss" /o"$(DistPath)"" /> | ||
</Target> | ||
|
||
<!-- Nuget --> | ||
<Target Name="CreateNuget" DependsOnTargets="PrepareArtifactsRoot"> | ||
<ItemGroup> | ||
<NugetAbleProject Include="ScriptEngine"/> | ||
<NugetAbleProject Include="ScriptEngine.HostedScript"/> | ||
</ItemGroup> | ||
|
||
<MSBuild Projects="src/%(NugetAbleProject.Identity)/%(NugetAbleProject.Identity).csproj" Targets="pack" Properties="PackageOutputPath=$(ArtifactsRoot);ReleaseNumber=$(ReleaseNumber)"/> | ||
|
||
</Target> | ||
|
||
<!-- ZIP --> | ||
<Target Name="CreateZip" DependsOnTargets="PrepareArtifactsRoot"> | ||
<Exec Command=""$(BinFolder)\oscript.exe" "$(MSBuildProjectDirectory)\install\unicode-zipper.os" pack "$(TempFolder)/*" "$(ArtifactsRoot)/OneScript-1.0.$(ReleaseNumber).zip""/> | ||
<Exec Command=""$(BinFolder)\oscript.exe" "$(MSBuildProjectDirectory)\install\unicode-zipper.os" pack "$(MDDocFolder)/*" "$(ArtifactsRoot)/mddoc-1.0.$(ReleaseNumber).zip""/> | ||
</Target> | ||
|
||
<!-- MSI --> | ||
<Target Name="CreateMSI"> | ||
<MSBuild Projects="$(MSBuildProjectDirectory)\src\Installer\Installer.wixproj" | ||
Properties="Configuration=$(Configuration);OutputPath=$(ArtifactsRoot);OutputPathForBuild=$(ArtifactsRoot);Version=$1.0.$(ReleaseNumber).$(BuildNumber)" /> | ||
</Target> | ||
|
||
|
||
<Target Name="xUnitTest" DependsOnTargets="PrepareArtifactsRoot"> | ||
|
||
<CreateItem Include="$(MSBuildProjectDirectory)\tests\*.os.xml"> | ||
<Output TaskParameter="Include" ItemName="RemoveXMLTestResult" /> | ||
</CreateItem> | ||
|
||
<Delete Files="@(RemoveXMLTestResult)" /> | ||
|
||
<Exec WorkingDirectory="$(MSBuildProjectDirectory)\tests" Command=""$(BinFolder)/oscript.exe" "$(MSBuildProjectDirectory)\tests\testrunner.os" -runall . xddReportPath ." IgnoreExitCode="true"/> | ||
|
||
</Target> | ||
|
||
</Project> |
Oops, something went wrong.