Skip to content

Commit

Permalink
test: GitVersion this thing!
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed May 8, 2024
1 parent d2d635a commit b9cbe51
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"commands": [
"husky"
]
},
"gitversion.tool": {
"version": "5.12.0",
"commands": [
"dotnet-gitversion"
]
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: .NET

on:
push:
branches: ["dui3/alpha", "dui3/ci/*"]
branches: ["dui3/ci/*"]
pull_request:
branches: ["dui3/alpha"]

Expand All @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x.x
global-json-file: ./global.json
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
# - name: Restore tools
Expand All @@ -32,5 +32,5 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: DUI3 Connectors
name: dui3-connector-build-artifacts
path: dist/zip/*.zip
7 changes: 4 additions & 3 deletions DUI3-DX/Connectors/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<OutputZipDirectory>$(RepositoryRoot)/dist/zip</OutputZipDirectory>
<OutputZipFile>$(ConnectorSlug)-$(ConnectorVersion)-$(Version).zip</OutputZipFile>
</PropertyGroup>

<RemoveDir Directories="$(OutputDirectory)"/>

<RemoveDir Directories="$(OutputDirectory)" ContinueOnError="true" />
<RemoveDir Directories="$(OutputZipDirectory)" ContinueOnError="true"/>
<MakeDir Directories="$(OutputDirectory)"/>
<MakeDir Directories="$(OutputZipDirectory)"/>

Expand All @@ -24,7 +25,7 @@

<Copy SourceFiles="@(DllFiles)" DestinationFolder="$(OutputDirectory)/%(RecursiveDir)"/>

<ZipDirectory SourceDirectory="$(OutputDirectory)" DestinationFile="$(OutputZipDirectory)/$(OutputZipFile)"/>
<ZipDirectory SourceDirectory="$(OutputDirectory)" DestinationFile="$(OutputZipDirectory)/$(OutputZipFile)" Overwrite="true"/>

</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Speckle.Converters.Common.Objects;
using Speckle;

namespace Speckle.Converters.Rhino7.ToHost.Raw;

Expand Down
12 changes: 7 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>

<!-- False if running on CI, will prevent copying of files to local folders -->
<IsDesktopBuild Condition="'$(IsDesktopBuild)' == ''">true</IsDesktopBuild>
<IsDesktopBuild Condition="'$(IsDesktopBuild)' == ''">false</IsDesktopBuild>

<!-- Code quality -->
<EnableNetAnalyzers>true</EnableNetAnalyzers>
Expand Down Expand Up @@ -106,9 +106,7 @@

<PropertyGroup Label="Package Config">
<!-- Version info -->
<Version Condition="$(Version) == ''">2.0.999-local</Version>
<FileVersion Condition="$(FileVersion) == ''">2.0.999.0000</FileVersion>
<AssemblyVersion Condition="$(AssemblyVersion) == ''">$(FileVersion)</AssemblyVersion>


<!-- Package info -->
<PackageVersion Condition="$(PackageVersion) == ''">$(Version)</PackageVersion>
Expand All @@ -127,7 +125,11 @@
<!-- Expose the repository root to all projects -->
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<!-- This file contains the configuration for some analyzer warnings, such as cyclomatic
complexity threshold -->
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
<!--
Reports the current build version number in the build logs.
-->
<Target Name="ReportBuildVersion" BeforeTargets="BeforeBuild">
<Target Name="ReportBuildVersion" AfterTargets="Build">
<Message
Text="Building $(MSBuildProjectName).csproj with version $(Version) and file version $(FileVersion)"
Text="Built $(MSBuildProjectName).csproj with version $(Version) and file version $(FileVersion)"
Importance="high"/>
</Target>

Expand Down

0 comments on commit b9cbe51

Please sign in to comment.