Skip to content

Commit

Permalink
Maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Sep 5, 2018
1 parent ec5db1e commit d6a4921
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/stale.yml
Expand Up @@ -6,6 +6,8 @@ daysUntilClose: 7
exemptLabels:
- pinned
- security
- planned
- nostale
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
Expand Down
33 changes: 30 additions & 3 deletions deployment/cake/apps-wpf-tasks.cake
Expand Up @@ -2,8 +2,10 @@

#addin "nuget:?package=Cake.Squirrel&version=0.13.0"
#addin "nuget:?package=MagicChunks&version=2.0.0.119"
//#addin "nuget:?Cake.AzureStorage&version=0.14.0"

#tool "nuget:?package=Squirrel.Windows&version=1.8.0"
#tool "nuget:?package=AzureStorageSync&version=2.0.0-alpha0028&prerelease"

//-------------------------------------------------------------

Expand Down Expand Up @@ -314,18 +316,43 @@ private void DeployWpfApps()
return;
}

var azureConnectionString = AzureDeploymentsStorageConnectionString;
if (string.IsNullOrWhiteSpace(azureConnectionString))
{
Warning("Skipping deployments of WPF apps because not Azure deployments storage connection string was specified");
return;
}

var azureStorageSyncExes = GetFiles("./tools/AzureStorageSync*/**/AzureStorageSync.exe");
var azureStorageSyncExe = azureStorageSyncExes.LastOrDefault();
if (azureStorageSyncExe == null)
{
Error("Can't find the AzureStorageSync tool that should have been installed via this script");
return;
}

foreach (var wpfApp in WpfApps)
{
if (!ShouldDeployProject(wpfApp))
{
Information("WPF app '{0}' should not be deployed", wpfApp);
continue;
}

LogSeparator("Deploying WPF app '{0}'", wpfApp);

// TODO: How to Deploy?
Warning("Deploying of WPF apps is not yet implemented, please deploy '{0}' manually", wpfApp);
//%DeploymentsShare%\%ProjectName% /%ProjectName% -c %AzureDeploymentsStorageConnectionString%
var deploymentShare = string.Format("{0}/{1}", DeploymentsShare, wpfApp);

var exitCode = StartProcess(azureStorageSyncExe, new ProcessSettings
{
Arguments = string.Format("{0} /{1} -c {2}", deploymentShare, wpfApp, azureConnectionString)
});

if (exitCode != 0)
{
Error("Received unexpected exit code '{0}' for WPF app '{1}'", exitCode, wpfApp);
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions deployment/cake/apps-wpf-variables.cake
Expand Up @@ -9,5 +9,8 @@ var UpdateDeploymentsShare = bool.Parse(GetBuildServerVariable("UpdateDeployment

// Squirrel

// Azure sync
var AzureDeploymentsStorageConnectionString = GetBuildServerVariable("AzureDeploymentsStorageConnectionString");


var WpfApps = WpfAppsToBuild ?? new string[] { };
8 changes: 6 additions & 2 deletions deployment/cake/components-tasks.cake
Expand Up @@ -85,8 +85,12 @@ private void BuildComponents()
msBuildSettings.WithProperty("OverridableOutputPath", outputDirectory);
msBuildSettings.WithProperty("PackageOutputPath", OutputRootDirectory);

// TODO: Enable GitLink / SourceLink, see RepositoryUrl, RepositoryBranchName, RepositoryCommitId variables

// SourceLink specific stuff
msBuildSettings.WithProperty("PublishRepositoryUrl", "true");

// For SourceLink to work, the .csproj should contain something like this:
// <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02 " PrivateAssets="all" />

MSBuild(projectFileName, msBuildSettings);
}
}
Expand Down
6 changes: 5 additions & 1 deletion deployment/cake/generic-tasks.cake
Expand Up @@ -146,7 +146,11 @@ private bool ShouldDeployProject(string projectName)
var slug = GetProjectSlug(projectName);
var keyToCheck = string.Format("Deploy{0}", slug);

var shouldDeploy = bool.Parse(GetBuildServerVariable(keyToCheck, "True"));
var value = GetBuildServerVariable(keyToCheck, "True");

Information("Value for '{0}': {1}", keyToCheck, value);

var shouldDeploy = bool.Parse(value);
return shouldDeploy;
}

Expand Down
1 change: 1 addition & 0 deletions src/Directory.build.shared.explicit.props
Expand Up @@ -36,6 +36,7 @@
<Resource Include="Resources\Fonts\**\*.ttf" />
<Resource Include="Resources\Images\**\*.png" />
<Resource Include="Resources\Images\**\*.gif" />
<EmbeddedResource Include="Resources\ThirdPartyNotices\**\*" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 14 additions & 8 deletions src/Directory.build.shared.implicit.props
Expand Up @@ -17,18 +17,24 @@
<Deterministic>False</Deterministic>
</PropertyGroup>

<!-- Note: Portable PDB's are disabled for now since ApiApprover breaks because of this -->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>pdbonly</DebugType>
</PropertyGroup>

<!-- Enforce portable pdb format -->
<!--<PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>-->

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<!-- (temporary?) workaround for https://github.com/dotnet/sdk/issues/1458 -->
<ItemGroup>
<PackageReference Include="SourceLink.Copy.PdbFiles" Version="2.8.3" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>

<PropertyGroup>
<!-- https://github.com/dotnet/sdk/issues/810 - the temporary project has the wrong file extension -->
Expand Down
4 changes: 2 additions & 2 deletions tools/packages.config
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.29.0" />
<package id="Cake.CoreCLR" version="0.29.0" />
<package id="Cake" version="0.30.0" />
<package id="Cake.CoreCLR" version="0.30.0" />
</packages>

0 comments on commit d6a4921

Please sign in to comment.