From e90dba17dd0a58b1cbab0f5a307dff5ffe1f3014 Mon Sep 17 00:00:00 2001 From: punker76 Date: Tue, 5 Nov 2024 21:50:24 +0100 Subject: [PATCH] ci: ContinuousIntegrationBuild on appveyor --- build.cake | 9 +++++++-- build/SharedVersion.props | 4 ---- build/SourceLink.props | 2 +- src/Directory.Build.targets | 5 +++++ src/IconPacks.Avalonia.sln | 2 ++ 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/build.cake b/build.cake index c6bc63a..b8ce727 100644 --- a/build.cake +++ b/build.cake @@ -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( @@ -72,6 +73,7 @@ Setup(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) @@ -87,7 +89,8 @@ Setup(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); @@ -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( @@ -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) diff --git a/build/SharedVersion.props b/build/SharedVersion.props index 5c23aa7..b236503 100644 --- a/build/SharedVersion.props +++ b/build/SharedVersion.props @@ -27,8 +27,4 @@ - - - - \ No newline at end of file diff --git a/build/SourceLink.props b/build/SourceLink.props index 709a32e..24f3a35 100644 --- a/build/SourceLink.props +++ b/build/SourceLink.props @@ -14,7 +14,7 @@ true - + true diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 6238add..bd0f7a2 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,7 +1,12 @@ + + $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) + + + \ No newline at end of file diff --git a/src/IconPacks.Avalonia.sln b/src/IconPacks.Avalonia.sln index 165dfa6..6afddec 100644 --- a/src/IconPacks.Avalonia.sln +++ b/src/IconPacks.Avalonia.sln @@ -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