-
-
Notifications
You must be signed in to change notification settings - Fork 11
Generalise local and CI build experiences #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,5 +1,3 @@ | ||
| <Project> | ||
|
|
||
| <Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" /> | ||
|
|
||
| </Project> |
This file contains hidden or 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,29 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <PropertyGroup> | ||
| <!-- To support GitExtensions.Extensibility 0.3.*, see https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1011 --> | ||
| <CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Solution dependencies --> | ||
| <ItemGroup> | ||
| <PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.2.41" /> | ||
| <PackageVersion Include="GitExtensions.Extensibility" Version="0.3.*" /> | ||
| <PackageVersion Include="Neptuo" Version="6.0.2" /> | ||
| <PackageVersion Include="Neptuo.Exceptions" Version="1.2.2" /> | ||
| <PackageVersion Include="Neptuo.Observables" Version="2.1.1" /> | ||
| <PackageVersion Include="NuGet.PackageManagement" Version="6.8.0" /> | ||
| <PackageVersion Include="System.Resources.Extensions" Version="8.0.0" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Test-related --> | ||
| <ItemGroup> | ||
| <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||
| <PackageVersion Include="Moq" Version="4.18.2" /> | ||
| <PackageVersion Include="MSTest.TestAdapter" Version="2.2.10" /> | ||
| <PackageVersion Include="MSTest.TestFramework" Version="2.2.10" /> | ||
| <PackageVersion Include="Appveyor.TestLogger" Version="2.0.0" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
110 changes: 110 additions & 0 deletions
110
src/GitExtensions.PluginManager/Project.Publish.targets
This file contains hidden or 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,110 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <_PackageManagerFolder>PackageManager</_PackageManagerFolder> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- | ||
| ============================================================ | ||
| _CopyPackageManager | ||
|
|
||
| Copy PackageManager.UI into GitExtensions.PluginManager so it can get packed and | ||
| to Git Extensions shared installation so we can test it locally | ||
| ============================================================ | ||
| --> | ||
| <Target Name="_CopyPackageManager"> | ||
| <PropertyGroup> | ||
| <_PackageManagerSourcePath>$([MSBuild]::NormalizePath('$(RepoRoot)', 'src', 'PackageManager.UI', 'bin', '$(Configuration)', '$(TargetFramework)', '$(PackageManagerUIRuntimeIdentifier)', 'publish', 'PackageManager.UI.exe'))</_PackageManagerSourcePath> | ||
| <_PackageManagerTargetPath>$(_PackageManagerFolder)\PackageManager.UI.exe</_PackageManagerTargetPath> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Copying to we can pack it --> | ||
| <Copy SourceFiles="$(_PackageManagerSourcePath)" | ||
| DestinationFiles="$(TargetDir)$(_PackageManagerTargetPath)" /> | ||
|
|
||
| <!-- Copying to Git Extensions shared installation so we can test it locally --> | ||
| <Copy SourceFiles="$(_PackageManagerSourcePath)" | ||
| DestinationFiles="$(GitExtensionsPluginsPath)\$(ProjectName)\$(_PackageManagerTargetPath)" /> | ||
| </Target> | ||
|
|
||
| <!-- | ||
| ============================================================ | ||
| _SetPackageProperties | ||
|
|
||
| Update nuspec properties. | ||
| ============================================================ | ||
| --> | ||
| <Target Name="_SetPackageProperties" BeforeTargets="GenerateNuspec"> | ||
| <PropertyGroup> | ||
| <NuspecProperties> | ||
| id=$(PackageId); | ||
| version=$(PackageVersion); | ||
| configuration=$(Configuration); | ||
| tags=$(PackageTags.Replace(';',' ')); | ||
| projectUrl=$(PackageProjectUrl); | ||
| iconUrl=$(PackageIconUrl); | ||
| repositoryUrl=$(RepositoryUrl); | ||
| repositoryType=$(RepositoryType); | ||
| repositoryCommit=$(RepositoryCommit); | ||
| author=$(Authors); | ||
| copyright=$(Copyright); | ||
| description=$(Description); | ||
| targetDir=$(TargetDir); | ||
| </NuspecProperties> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <!-- | ||
| ============================================================ | ||
| _OverrideGetAbsoluteOutputPathsForPack | ||
|
|
||
| Override PackageOutputAbsolutePath to output the nupkg in artifacts folder instead of bin. | ||
| ============================================================ | ||
| --> | ||
| <Target Name="_OverrideGetAbsoluteOutputPathsForPack" AfterTargets="_GetAbsoluteOutputPathsForPack"> | ||
| <PropertyGroup> | ||
| <!-- Set the nupkg output path, used by GenerateNuspec targets, PackTask task --> | ||
| <PackageOutputAbsolutePath>$([MSBuild]::NormalizePath('$(ArtifactsDir)', '..'))</PackageOutputAbsolutePath> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <!-- | ||
| ============================================================ | ||
| CreatePortable | ||
|
|
||
| Creates a portable archive. | ||
| ============================================================ | ||
| --> | ||
| <Target Name="CreatePortable" | ||
| AfterTargets="Publish" | ||
| DependsOnTargets="_CopyPackageManager;Pack"> | ||
| <PropertyGroup> | ||
| <_PublishPortableFileName>GitExtensions.PluginManager.$(PackageVersion).zip</_PublishPortableFileName> | ||
| <_PublishPortablePath>$([MSBuild]::NormalizePath('$(ArtifactsDir)', '..', '$(_PublishPortableFileName)'))</_PublishPortablePath> | ||
|
|
||
| <!-- We want to archive the whole publish folder, so get one level up --> | ||
| <_PublishedPath>$([MSBuild]::NormalizeDirectory('$(PublishDir)'))</_PublishedPath> | ||
| </PropertyGroup> | ||
| <!-- 1. Copy GitExtensions.PluginManager.dll and PackageManager\PackageManager.UI.exe files --> | ||
| <Copy | ||
| SourceFiles="$(TargetPath)" | ||
| DestinationFolder="$(ArtifactsTmpDir)" | ||
| ContinueOnError="ErrorAndStop" | ||
| /> | ||
| <ItemGroup> | ||
| <_ZipContent Include="$([MSBuild]::NormalizePath('$(TargetDir)', '$(_PackageManagerFolder)'))\*.*" /> | ||
| </ItemGroup> | ||
| <Copy | ||
| SourceFiles="@(_ZipContent)" | ||
| DestinationFolder="$(ArtifactsTmpDir)$(_PackageManagerFolder)\%(RecursiveDir)" | ||
| ContinueOnError="ErrorAndStop" | ||
| /> | ||
|
|
||
| <!-- 2. Create a portable archive --> | ||
| <ZipDirectory | ||
| SourceDirectory="$(ArtifactsTmpDir)" | ||
| DestinationFile="$(_PublishPortablePath)" | ||
| Overwrite="true" | ||
| ContinueOnError="ErrorAndStop" | ||
| /> | ||
| </Target> | ||
| </Project> |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we can't target
win-x64?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to blame anything and don't have any recollection 🤷♂️