Skip to content

Commit 953616e

Browse files
committed
Update Configuration
Only run global Vault refresh thread if client is not null and at least 1 provider actually wants it. Skip duplicate uploading of snupkg because it actually uploads with the build now?
1 parent 1dc5227 commit 953616e

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ jobs:
9292

9393
steps:
9494
# Setup
95-
- name: Setup .NET 6
95+
- name: Setup .NET 8
9696
uses: actions/setup-dotnet@v4
9797
with:
98-
dotnet-version: "6.0.x"
98+
dotnet-version: "8.0.x"
9999

100100
- name: Download build artifacts
101101
uses: actions/download-artifact@v4
@@ -106,4 +106,3 @@ jobs:
106106
- name: Publish NuGet Packages
107107
run: |
108108
dotnet nuget push dist/*.nupkg --skip-duplicate --source ${{ vars.NUGET_SOURCE }} --api-key ${{ secrets.NUGET_API_KEY }}
109-
dotnet nuget push dist/*.snupkg --skip-duplicate --source ${{ vars.NUGET_SOURCE }} --api-key ${{ secrets.NUGET_API_KEY }}

src/Directory.Build.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
<Target Name="AddGitMetadaAssemblyAttributes"
1212
BeforeTargets="GetAssemblyAttributes">
1313

14-
<!--Executes
15-
the Git Commands to get the Hash and Branch-->
14+
<!--Executes the Git Commands to get the Hash and Branch-->
1615
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true"
1716
StandardOutputImportance="low" IgnoreExitCode="true" Condition=" '$(CommitHash)' == '' " WorkingDirectory="$(RootDirectory)">
1817
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHash" />
@@ -38,7 +37,7 @@
3837
<Copyright>Copyright © $(Company) $([System.DateTime]::Now.ToString(`yyyy`)). All rights reserved.</Copyright>
3938
<Authors>$(Company);Nikita Petko</Authors>
4039

41-
<VersionPrefix>1.1.1</VersionPrefix>
40+
<VersionPrefix>1.1.2</VersionPrefix>
4241

4342
<RepositoryUrl>https://github.com/mfdlabs/grid-bot-libraries</RepositoryUrl>
4443
<RepositoryType>git</RepositoryType>

src/configuration/configuration/Implementation/VaultProvider.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ public static void RefreshAllProviders()
9595
/// <inheritdoc cref="BaseProvider.SetRawValue{T}(string, T)"/>
9696
protected override void SetRawValue<T>(string variable, T value)
9797
{
98-
if (_client == null) return;
98+
if (_client == null)
99+
{
100+
base.SetRawValue(variable, value);
101+
102+
return;
103+
}
99104

100105
_logger?.Information("VaultProvider: Set value in vault at path '{0}/{1}/{2}'", Mount, Path, variable);
101106

@@ -174,7 +179,7 @@ protected VaultProvider(ILogger logger = null, bool periodicRefresh = true)
174179

175180
SetLogger(logger);
176181

177-
if (periodicRefresh)
182+
if (periodicRefresh && _client != null) // Periodic refresh only needed in Vault environments
178183
{
179184
TryInitializeGlobalRefreshThread();
180185

0 commit comments

Comments
 (0)