Skip to content

Commit

Permalink
remove restore keys (#1)
Browse files Browse the repository at this point in the history
* remove restore keys

* add gitversion tool

* old csharpier for now

* fix build?
  • Loading branch information
adamhathcock authored Jul 4, 2024
1 parent 295ba92 commit ce815aa
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
8 changes: 7 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.28.2",
"version": "0.23.0",
"commands": [
"dotnet-csharpier"
]
},
"gitversion.tool": {
"version": "5.12.0",
"commands": [
"dotnet-gitversion"
]
}
}
}
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: ⚒️ Run GitVersion
run: ./build.ps1 build-server-version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tools
.DS_Store
*.snupkg
coverage.xml
output/
16 changes: 7 additions & 9 deletions Build/Consts.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
using System.Collections.Generic;

namespace Build;
namespace Build;

public static class Consts
{
public static readonly string[] Solutions = { "DUI3-DX.slnf" };
public static readonly string[] TestProjects = System.Array.Empty<string>();
public static readonly string[] Solutions = ["Speckle.Connectors.sln" ];
public static readonly string[] TestProjects = [];

public static readonly InstallerProject[] InstallerManifests =
{
new(
"arcgis",
new InstallerAsset[] { new("DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows") }
new InstallerAsset[] { new("Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows") }
),
new("rhino", new InstallerAsset[] { new("DUI3-DX/Connectors/Rhino/Speckle.Connectors.Rhino7", "net48") }),
new("revit", new InstallerAsset[] { new("DUI3-DX/Connectors/Revit/Speckle.Connectors.Revit2023", "net48") }),
new("autocad", new InstallerAsset[] { new("DUI3-DX/Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48") })
new("rhino", new InstallerAsset[] { new("Connectors/Rhino/Speckle.Connectors.Rhino7", "net48") }),
new("revit", new InstallerAsset[] { new("Connectors/Revit/Speckle.Connectors.Revit2023", "net48") }),
new("autocad", new InstallerAsset[] { new("Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48") })
};
}

Expand Down
10 changes: 2 additions & 8 deletions Build/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using Build;
using GlobExpressions;
Expand Down Expand Up @@ -107,10 +104,7 @@ void RemoveDirectory(string d)
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}");
Run(
"dotnet",
$"build {s} -c Release --no-restore -p:IsDesktopBuild=false -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
Run("dotnet", $"build {s} -c Release --no-restore -p:Version={version} -p:FileVersion={fileVersion} -v:m");
}
);

Expand All @@ -127,7 +121,7 @@ IEnumerable<string> GetFiles(string d)
foreach (var file in GetFiles($"**/{t}.csproj"))
{
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal");
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true");
}
}
);
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="altcover" Version="8.8.74" />
<PackageVersion Include="Autofac" Version="5.2.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="7.0.0" />
Expand Down

0 comments on commit ce815aa

Please sign in to comment.