Skip to content

Commit

Permalink
Add artifacts to AppVeyor build (DevExpress#117)
Browse files Browse the repository at this point in the history
add artifacts to AppVeyor build
  • Loading branch information
MikhailTymchukDX authored Jul 28, 2016
1 parent 01065ba commit b217151
Show file tree
Hide file tree
Showing 19 changed files with 112 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -28,7 +28,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
8 changes: 4 additions & 4 deletions AjaxControlToolkit.CdnBundleBuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ static void Main(string[] args) {

var context = new BundleContext(CreateHttpContext(), BundleTable.Bundles, String.Empty);

File.WriteAllText("../AjaxControlToolkit.StaticResources/Scripts/Bundle.js", scriptBundle.GenerateBundleResponse(context).Content);
File.WriteAllText("../AjaxControlToolkit.StaticResources/Styles/Bundle.css", styleBundle.GenerateBundleResponse(context).Content);
File.WriteAllText("../../AjaxControlToolkit.StaticResources/Scripts/Bundle.js", scriptBundle.GenerateBundleResponse(context).Content);
File.WriteAllText("../../AjaxControlToolkit.StaticResources/Styles/Bundle.css", styleBundle.GenerateBundleResponse(context).Content);
}

static HttpContextWrapper CreateHttpContext() {
Expand All @@ -34,8 +34,8 @@ static HttpContextWrapper CreateHttpContext() {
class VirtualPathProviderImpl : VirtualPathProvider {
public override VirtualFile GetFile(string virtualPath) {
virtualPath = virtualPath
.Replace("~/Scripts/AjaxControlToolkit/", "../AjaxControlToolkit.StaticResources/Scripts/")
.Replace("~/Content/AjaxControlToolkit/Styles", "../AjaxControlToolkit.StaticResources/Styles/");
.Replace("~/Scripts/AjaxControlToolkit/", "../../AjaxControlToolkit.StaticResources/Scripts/")
.Replace("~/Content/AjaxControlToolkit/Styles", "../../AjaxControlToolkit.StaticResources/Styles/");

return new VirtualFileImpl(virtualPath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -26,7 +26,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
2 changes: 1 addition & 1 deletion AjaxControlToolkit.LinkStaticResources/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace AjaxControlToolkit.LinkStaticResources {
class Program {

static void Main(string[] args) {
string solutionDirPath = Directory.GetParent(Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName).FullName;
string solutionDirPath = Directory.GetParent(Directory.GetParent(Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName).FullName).FullName;

string
outputDir = Path.Combine(solutionDirPath, @"AjaxControlToolkit.StaticResources\"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace AjaxControlToolkit.Reference.Controllers {
public class ReleaseNotesController : Controller {
public ActionResult Index() {
var milestones = new string[] { "16.2" };
var milestones = new string[] { "16.1.1" };

return View(milestones);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -27,7 +27,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
4 changes: 2 additions & 2 deletions AjaxControlToolkit.Tests/AjaxControlToolkit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void DocumentationConsistent() {
}

static string GetScriptFolder() {
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\AjaxControlToolkit\Scripts");
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\AjaxControlToolkit\Scripts");
}

static string GetXmlDocFolder() {
Expand Down
2 changes: 1 addition & 1 deletion AjaxControlToolkit.Tests/JasmineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void Setup() {
}

static string GetDriverDirectory() {
return Path.GetDirectoryName(typeof(JasmineTests).Assembly.Location);
return Directory.GetParent(Path.GetDirectoryName(typeof(JasmineTests).Assembly.Location)).FullName;
}

[Test]
Expand Down
10 changes: 6 additions & 4 deletions AjaxControlToolkit/AjaxControlToolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,21 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\bin\AjaxControlToolkit.XML</DocumentationFile>
<DocumentationFile>..\bin\Debug\AjaxControlToolkit.XML</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\bin\Release\AjaxControlToolkit.XML</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -1379,7 +1380,8 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>"$(TargetDir)LinkStaticResources"</PostBuildEvent>
<PostBuildEvent>"$(TargetDir)LinkStaticResources"
copy "$(TargetDir)AjaxControlToolkit.xml" ""$(TargetDir)\.."</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="..\bin\AjaxControlToolkit.dll">
<Content Include="..\bin\Release\AjaxControlToolkit.dll">
<Link>AjaxControlToolkit.dll</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
Expand Down
40 changes: 40 additions & 0 deletions AppVeyor/CreateArtifacts.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
New-Item AjaxControlToolkit.StaticResources\Content\AjaxControlToolkit\Images -type directory
New-Item AjaxControlToolkit.StaticResources\Content\AjaxControlToolkit\Styles -type directory
New-Item AjaxControlToolkit.StaticResources\Scripts\AjaxControlToolkit\Debug -type directory
New-Item AjaxControlToolkit.StaticResources\Scripts\AjaxControlToolkit\Release -type directory

Copy-Item -Path AjaxControlToolkit.StaticResources\Images\* -Destination AjaxControlToolkit.StaticResources\Content\AjaxControlToolkit\Images -Recurse
Copy-Item -Path AjaxControlToolkit.StaticResources\Styles\* -Destination AjaxControlToolkit.StaticResources\Content\AjaxControlToolkit\Styles -Recurse
Copy-Item -Path AjaxControlToolkit.StaticResources\Scripts\Debug\* -Destination AjaxControlToolkit.StaticResources\Scripts\AjaxControlToolkit\Debug -Recurse
Copy-Item -Path AjaxControlToolkit.StaticResources\Scripts\Release\* -Destination AjaxControlToolkit.StaticResources\Scripts\AjaxControlToolkit\Release -Recurse

$archiveSuffix = "build"

Push-Location -Path "AjaxControlToolkit.StaticResources"
7z a ..\AjaxControlToolkit.StaticResources-$archiveSuffix-$env:APPVEYOR_BUILD_NUMBER.zip Content\AjaxControlToolkit\Images -ir!Content\AjaxControlToolkit\Styles\* -ir!Scripts\AjaxControlToolkit\Debug\* -ir!Scripts\AjaxControlToolkit\Release\* ..\bin\Release\AjaxControlToolkit.StaticResources.???
Pop-Location

Push-Location -Path "bin\Release"
7z a ..\..\AjaxControlToolkit-$archiveSuffix-$env:APPVEYOR_BUILD_NUMBER.zip AjaxControlToolkit.???
7z a ..\..\AjaxControlToolkit.HtmlEditor.Sanitizer-$archiveSuffix-$env:APPVEYOR_BUILD_NUMBER.zip AjaxControlToolkit.HtmlEditor.Sanitizer.???
Pop-Location

$sampleSiteFolder = "AjaxControlToolkit.SampleSite\"
Copy-Item "bin\Release\AjaxControlToolkit.dll" -Destination "$sampleSiteFolder\bin"
Copy-Item "bin\Release\AjaxControlToolkit.HtmlEditor.Sanitizer.dll" -Destination "$sampleSiteFolder\bin"
Copy-Item "bin\Release\AjaxControlToolkit.StaticResources.dll" -Destination "$sampleSiteFolder\bin"

nuget restore "$sampleSiteFolder\packages.config" -SolutionDirectory $sampleSiteFolder
$sampleSiteBinFolder = Join-Path $sampleSiteFolder "bin"
Get-ChildItem $sampleSiteBinFolder -Filter *.refresh | `
ForEach-Object {
$content = Get-Content $_.FullName
$dllFileName = $content -replace "^\.\.\\", ""
Copy-Item "$sampleSiteFolder/$dllFileName" $sampleSiteBinFolder -Force
}

Remove-Item "$sampleSiteFolder\bin\*" -Exclude *.dll
Remove-Item "$sampleSiteFolder\packages" -Recurse -Force
Remove-Item "$sampleSiteFolder\packages.config"

7z a AjaxControlToolkit.SampleSite-$archiveSuffix-$env:APPVEYOR_BUILD_NUMBER.zip $sampleSiteFolder
12 changes: 12 additions & 0 deletions AppVeyor/DeployJasmineSite.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:iisApp="$env:APPVEYOR_BUILD_FOLDER\AjaxControlToolkit.Jasmine" -dest:iisApp=`"Default Web Site`"

$FilesAndFolders = gci "C:\inetpub\wwwroot" -recurse | % {$_.FullName}
foreach($FileAndFolder in $FilesAndFolders)
{
$item = gi -literalpath $FileAndFolder
$acl = $item.GetAccessControl()
$permission = "Everyone","FullControl","Allow"
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
$acl.SetAccessRule($rule)
$item.SetAccessControl($acl)
}
2 changes: 1 addition & 1 deletion ReferenceCore/GitHubIssue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace AjaxControlToolkit.Reference {
public class GitHubIssue {

public string Url { get; set; }
public string Html_Url { get; set; }
public int Number { get; set; }
public string Title { get; set; }
public List<GitHubLabel> Labels;
Expand Down
4 changes: 2 additions & 2 deletions ReferenceCore/ReleaseNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void BuildTypeIssues(IEnumerable<GitHubIssue> typeIssues, string typeNam
_markupStringBuilder.Append(
_renderer.RenderListItem(
String.Format("Item {0} - {1}",
_renderer.RenderUrl(issue.Number.ToString(), issue.Url),
_renderer.RenderUrl(issue.Number.ToString(), issue.Html_Url),
_renderer.RenderText(issue.Title))));

issueCounter++;
Expand All @@ -91,7 +91,7 @@ private void BuildWarningSection(IEnumerable<GitHubIssue> invalidIssues) {
_markupStringBuilder.Append(_renderer.RenderNewParagraph());

foreach(var issue in invalidIssues)
_markupStringBuilder.Append(_renderer.RenderListItem(_renderer.RenderUrl(issue.Title, issue.Url)));
_markupStringBuilder.Append(_renderer.RenderListItem(_renderer.RenderUrl(issue.Title, issue.Html_Url)));
}
}
}
14 changes: 10 additions & 4 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
// WARNING this file is shared accross multiple projects

[assembly: AssemblyProduct("ASP.NET AJAX Control Toolkit")]
[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2012-2015")]
[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2012-2016")]
[assembly: AssemblyCompany("CodePlex Foundation")]

[assembly: AssemblyVersion("15.1.2.0")]
[assembly: AssemblyFileVersion("15.1.2.0")]
[assembly: AssemblyVersion("16.1.1.0")]
[assembly: AssemblyFileVersion("16.1.1.0")]

[assembly: NeutralResourcesLanguage("en-US")]
[assembly: NeutralResourcesLanguage("en-US")]

#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Release")]
#endif
30 changes: 21 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,38 @@ os: Visual Studio 2013
init:
- git config --global core.autocrlf true


install:
# Workaround for NUnit Console Runner v3.2.1 timeout bug (#1509). Try to remove it when a fix is available.
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/nunit-3-2-0.ps1'))


environment:
AjaxControlToolkitTestSiteUrl: http://localhost/TestRunner.aspx

cache:
- packages -> **\packages.config

services: iis

before_build:
- ps: nuget restore

build:
project: AjaxControlToolkit.sln
publish_wap: true
verbosity: minimal
verbosity: minimal

artifacts:
- path: AjaxControlToolkit-build-*.zip
- path: AjaxControlToolkit.StaticResources-build-*.zip
- path: AjaxControlToolkit.HtmlEditor.Sanitizer-build-*.zip
- path: AjaxControlToolkit.SampleSite-build-*.zip

test:
assemblies: bin\AjaxControlToolkit.Tests.dll

services: iis

before_test:
- ps: "& \"C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe\" -verb:sync -source:iisApp=\"$env:APPVEYOR_BUILD_FOLDER\\AjaxControlToolkit.Jasmine\" -dest:iisApp=`\"Default Web Site`\"\n\n\n$FilesAndFolders = gci \"C:\\inetpub\\wwwroot\" -recurse | % {$_.FullName}\nforeach($FileAndFolder in $FilesAndFolders)\n{\n $item = gi -literalpath $FileAndFolder \n $acl = $item.GetAccessControl() \n $permission = \"Everyone\",\"FullControl\",\"Allow\"\n $rule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission\n $acl.SetAccessRule($rule)\n $item.SetAccessControl($acl)\n}"
- ps: '& "AppVeyor\DeployJasmineSite.ps1"'

test:
assemblies: bin\Debug\AjaxControlToolkit.Tests.dll

after_test:
- ps: 'msbuild "AjaxControlToolkit.sln" /p:Configuration=Release /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'
- ps: '& "AppVeyor\CreateArtifacts.ps1"'

0 comments on commit b217151

Please sign in to comment.