Skip to content

Commit

Permalink
update build stamp and tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jan 3, 2025
1 parent 11fe8e8 commit ebccf6f
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rollForward": false
},
"gitversion.tool": {
"version": "5.12.0",
"version": "6.1.0",
"commands": [
"dotnet-gitversion"
],
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}

- name: ⚒️ Run GitVersion
run: ./build.sh build-server-version

- name: 🔫 Build and Pack
run: ./build.sh pack
Expand Down
7 changes: 3 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="altcover" Version="8.9.3" />
<PackageVersion Include="altcover" Version="9.0.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Bullseye" Version="5.0.0" />
<PackageVersion Include="GraphQL.Client" Version="6.0.0" />
Expand All @@ -10,14 +10,14 @@
<!-- Keep at exactly 7.0.5 for side by side with V2 -->
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.5" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="8.0.11" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit" Version="4.3.2" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="Open.ChannelExtensions" Version="8.6.0" />
<PackageVersion Include="Polly" Version="7.2.3" />
Expand All @@ -30,7 +30,6 @@
<PackageVersion Include="System.Threading.Channels" Version="8.0.0" />
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
<GlobalPackageReference Include="Speckle.InterfaceGenerator" Version="0.9.6" />
</ItemGroup>
</Project>
13 changes: 4 additions & 9 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
workflow: GitFlow/v1
next-version: 3.0.0
mode: ContinuousDeployment
assembly-informational-format: "{Major}.{Minor}.{Patch}-{PreReleaseTag}"
branches:
main:
regex: ^main$
tag: rc
develop:
tag: dev
pull-request:
tag: pr
release:
prevent-increment:
when-current-commit-tagged: true
20 changes: 17 additions & 3 deletions build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
const string CLEAN = "clean";
const string FORMAT = "format";
const string RESTORE_TOOLS = "restore-tools";
const string BUILD_SERVER_VERSION = "build-server-version";

const string RESTORE = "restore";
const string BUILD = "build";
Expand Down Expand Up @@ -59,14 +60,27 @@ void RemoveDirectory(string d)

Target(FORMAT, DependsOn(RESTORE_TOOLS), () => RunAsync("dotnet", "csharpier --check ."));


Target(
BUILD_SERVER_VERSION,
DependsOn(RESTORE_TOOLS),
() =>
{
Run("dotnet", "tool run dotnet-gitversion /output json /output buildserver");
}
);

Target(RESTORE, () => RunAsync("dotnet", "restore Speckle.Sdk.sln --locked-mode"));

Target(
BUILD,
DependsOn(RESTORE),
async () =>
{
await RunAsync("dotnet", $"build Speckle.Sdk.sln -c Release --no-restore -warnaserror").ConfigureAwait(false);
var version = Environment.GetEnvironmentVariable("GitVersion_FullSemVer") ?? "3.0.0-localBuild";
var fileVersion = Environment.GetEnvironmentVariable("GitVersion_AssemblySemFileVer") ?? "3.0.0.0";
Console.WriteLine($"Version: {version} & {fileVersion}");
await RunAsync("dotnet", $"build Speckle.Sdk.sln -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion}").ConfigureAwait(false);
}
);

Expand Down Expand Up @@ -126,8 +140,8 @@ void CheckBuildDirectory(string dir, string build)

static Task RunPack() => RunAsync("dotnet", "pack Speckle.Sdk.sln -c Release -o output --no-build");

Target(PACK, DependsOn(TEST), RunPack);
Target(PACK_LOCAL, DependsOn(BUILD), RunPack);
Target(PACK, DependsOn(BUILD_SERVER_VERSION, TEST), RunPack);
Target(PACK_LOCAL, DependsOn(BUILD_SERVER_VERSION, BUILD), RunPack);

Target("default", DependsOn(FORMAT, TEST, INTEGRATION), () => Console.WriteLine("Done!"));

Expand Down
6 changes: 0 additions & 6 deletions build/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"resolved": "5.0.0",
"contentHash": "bqyt+m17ym+5aN45C5oZRAjuLDt8jKiCm/ys1XfymIXSkrTFwvI/QsbY3ucPSHDz7SF7uON7B57kXFv5H2k1ew=="
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Glob": {
"type": "Direct",
"requested": "[1.1.9, )",
Expand Down
12 changes: 0 additions & 12 deletions src/Speckle.Objects/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 2,
"dependencies": {
".NETStandard,Version=v2.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
Expand Down Expand Up @@ -315,12 +309,6 @@
}
},
"net8.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
Expand Down
12 changes: 0 additions & 12 deletions src/Speckle.Sdk.Dependencies/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 2,
"dependencies": {
".NETStandard,Version=v2.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"ILRepack.FullAuto": {
"type": "Direct",
"requested": "[1.6.0, )",
Expand Down Expand Up @@ -168,12 +162,6 @@
}
},
"net8.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"ILRepack.FullAuto": {
"type": "Direct",
"requested": "[1.6.0, )",
Expand Down
12 changes: 0 additions & 12 deletions src/Speckle.Sdk/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 2,
"dependencies": {
".NETStandard,Version=v2.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"GraphQL.Client": {
"type": "Direct",
"requested": "[6.0.0, )",
Expand Down Expand Up @@ -301,12 +295,6 @@
}
},
"net8.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"GraphQL.Client": {
"type": "Direct",
"requested": "[6.0.0, )",
Expand Down
42 changes: 18 additions & 24 deletions tests/Speckle.Objects.Tests.Unit/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@
"net8.0": {
"altcover": {
"type": "Direct",
"requested": "[8.9.3, )",
"resolved": "8.9.3",
"contentHash": "auKC+pDCkLjfhFkSRaAUBu25BOmlLSqucR7YBs/Lkbdc0XRuJoklWafs1KKp+M+VoJ1f0TeMS6B/FO5IeIcu7w=="
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
"requested": "[9.0.1, )",
"resolved": "9.0.1",
"contentHash": "aadciFNDT5bnylaYUkKal+s5hF7yU/lmZxImQWAlk1438iPqK1Uf79H5ylELpyLIU49HL5ql+tnWBihp3WVLCA=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.11.1, )",
"resolved": "17.11.1",
"contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"requested": "[17.12.0, )",
"resolved": "17.12.0",
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
"dependencies": {
"Microsoft.CodeCoverage": "17.11.1",
"Microsoft.TestPlatform.TestHost": "17.11.1"
"Microsoft.CodeCoverage": "17.12.0",
"Microsoft.TestPlatform.TestHost": "17.12.0"
}
},
"Microsoft.SourceLink.GitHub": {
Expand All @@ -36,9 +30,9 @@
},
"NUnit": {
"type": "Direct",
"requested": "[4.2.2, )",
"resolved": "4.2.2",
"contentHash": "mon0OPko28yZ/foVXrhiUvq1LReaGsBdziumyyYGxV/pOE4q92fuYeN+AF+gEU5pCjzykcdBt5l7xobTaiBjsg=="
"requested": "[4.3.2, )",
"resolved": "4.3.2",
"contentHash": "puVXayXNmEu7MFQSUswGmUjOy3M3baprMbkLl5PAutpeDoGTr+jPv33qAYsqxywi2wJCq8l/O3EhHoLulPE1iQ=="
},
"NUnit3TestAdapter": {
"type": "Direct",
Expand Down Expand Up @@ -110,8 +104,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
"resolved": "17.12.0",
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
Expand Down Expand Up @@ -176,18 +170,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"resolved": "17.12.0",
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"resolved": "17.12.0",
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
"Newtonsoft.Json": "13.0.1"
}
},
Expand Down
6 changes: 0 additions & 6 deletions tests/Speckle.Sdk.Serialization.Testing/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 2,
"dependencies": {
"net8.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Microsoft.Extensions.DependencyInjection": {
"type": "Direct",
"requested": "[2.2.0, )",
Expand Down
42 changes: 18 additions & 24 deletions tests/Speckle.Sdk.Serialization.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@
"net8.0": {
"altcover": {
"type": "Direct",
"requested": "[8.9.3, )",
"resolved": "8.9.3",
"contentHash": "auKC+pDCkLjfhFkSRaAUBu25BOmlLSqucR7YBs/Lkbdc0XRuJoklWafs1KKp+M+VoJ1f0TeMS6B/FO5IeIcu7w=="
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
"requested": "[9.0.1, )",
"resolved": "9.0.1",
"contentHash": "aadciFNDT5bnylaYUkKal+s5hF7yU/lmZxImQWAlk1438iPqK1Uf79H5ylELpyLIU49HL5ql+tnWBihp3WVLCA=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.11.1, )",
"resolved": "17.11.1",
"contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"requested": "[17.12.0, )",
"resolved": "17.12.0",
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
"dependencies": {
"Microsoft.CodeCoverage": "17.11.1",
"Microsoft.TestPlatform.TestHost": "17.11.1"
"Microsoft.CodeCoverage": "17.12.0",
"Microsoft.TestPlatform.TestHost": "17.12.0"
}
},
"Microsoft.SourceLink.GitHub": {
Expand All @@ -36,9 +30,9 @@
},
"NUnit": {
"type": "Direct",
"requested": "[4.2.2, )",
"resolved": "4.2.2",
"contentHash": "mon0OPko28yZ/foVXrhiUvq1LReaGsBdziumyyYGxV/pOE4q92fuYeN+AF+gEU5pCjzykcdBt5l7xobTaiBjsg=="
"requested": "[4.3.2, )",
"resolved": "4.3.2",
"contentHash": "puVXayXNmEu7MFQSUswGmUjOy3M3baprMbkLl5PAutpeDoGTr+jPv33qAYsqxywi2wJCq8l/O3EhHoLulPE1iQ=="
},
"NUnit3TestAdapter": {
"type": "Direct",
Expand Down Expand Up @@ -110,8 +104,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
"resolved": "17.12.0",
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
Expand Down Expand Up @@ -176,18 +170,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"resolved": "17.12.0",
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
"resolved": "17.11.1",
"contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"resolved": "17.12.0",
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
"Newtonsoft.Json": "13.0.1"
}
},
Expand Down
Loading

0 comments on commit ebccf6f

Please sign in to comment.