Skip to content

Commit

Permalink
ci: ContinuousIntegrationBuild on appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Nov 5, 2024
1 parent 8130cdb commit e90dba1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
9 changes: 7 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class BuildData
public bool IsLocalBuild { get; set; }
public bool IsPullRequest { get; set; }
public bool IsPrerelease { get; set; }
public bool IsRunningOnCI { get; set; }
public GitVersion GitVersion { get; set; }

public BuildData(
Expand Down Expand Up @@ -72,6 +73,7 @@ Setup<BuildData>(ctx =>
)
{
IsLocalBuild = BuildSystem.IsLocalBuild,
IsRunningOnCI = BuildSystem.GitHubActions.IsRunningOnGitHubActions || BuildSystem.AppVeyor.IsRunningOnAppVeyor,
IsPullRequest =
(BuildSystem.GitHubActions.IsRunningOnGitHubActions && BuildSystem.GitHubActions.Environment.PullRequest.IsPullRequest)
|| (BuildSystem.AppVeyor.IsRunningOnAppVeyor && BuildSystem.AppVeyor.Environment.PullRequest.IsPullRequest)
Expand All @@ -87,7 +89,8 @@ Setup<BuildData>(ctx =>
Information("GitVersion : {0}", gitVersionPath);
Information("Branch : {0}", buildData.GitVersion.BranchName);
Information("Configuration : {0}", buildData.Configuration);
Information("IsLocalBuild : {0}", buildData.IsLocalBuild);
Information("IsRunningOnCI : {0}", buildData.IsRunningOnCI);
Information("IsPrerelease : {0}", buildData.IsPrerelease);
Information("IsPrerelease : {0}", buildData.IsPrerelease);
Information("Informational Version: {0}", buildData.GitVersion.InformationalVersion);
Information("SemVer Version: {0}", buildData.GitVersion.SemVer);
Expand Down Expand Up @@ -135,6 +138,7 @@ Task("Build")
AssemblyVersion = data.GitVersion.AssemblySemVer,
FileVersion = data.GitVersion.AssemblySemFileVer,
InformationalVersion = data.GitVersion.InformationalVersion,
ContinuousIntegrationBuild = data.IsRunningOnCI,
ArgumentCustomization = args => args.Append("/m").Append("/nr:false") // The /nr switch tells msbuild to quite once it's done
};
// msbuildSettings.FileLoggers.Add(
Expand Down Expand Up @@ -169,7 +173,8 @@ Task("Pack")
Version = data.GitVersion.NuGetVersion,
AssemblyVersion = data.GitVersion.AssemblySemVer,
FileVersion = data.GitVersion.AssemblySemFileVer,
InformationalVersion = data.GitVersion.InformationalVersion
InformationalVersion = data.GitVersion.InformationalVersion,
ContinuousIntegrationBuild = data.IsRunningOnCI
}
.WithProperty("IncludeBuildOutput", "true")
.WithProperty("RepositoryBranch", data.GitVersion.BranchName)
Expand Down
4 changes: 0 additions & 4 deletions build/SharedVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,4 @@
<None Include="$(MSBuildThisFileDirectory)/../resources/logo_small.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion build/SourceLink.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'True'">
<PropertyGroup Condition="'$(APPVEYOR)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

Expand Down
5 changes: 5 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>

<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
<EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/IconPacks.Avalonia.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IconPacks.Avalonia.Core", "
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EE320BBB-E441-4C3B-9F5B-C56BF8020DF8}"
ProjectSection(SolutionItems) = preProject
..\build.cake = ..\build.cake
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
..\build\SharedVersion.props = ..\build\SharedVersion.props
..\build\SignAssembly.props = ..\build\SignAssembly.props
Expand Down

0 comments on commit e90dba1

Please sign in to comment.