diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml
index 4293fa8b..0dd68721 100644
--- a/.github/workflows/Publish.yml
+++ b/.github/workflows/Publish.yml
@@ -194,7 +194,7 @@ jobs:
languages: 'csharp'
queries: security-and-quality
config-file: ./.github/codeql/codeql-config.yml
- tools: latest
+ tools: linked
- name: Restore dependencies
run: dotnet restore
@@ -270,23 +270,10 @@ jobs:
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-
- - name: Install GitVersion
- uses: gittools/actions/gitversion/setup@v0
- with:
- versionSpec: '6.x'
- includePrerelease: true
-
- - name: Determine Version
- id: gitversion
- uses: gittools/actions/gitversion/execute@v0
- with:
- useConfigFile: true
- updateAssemblyInfo: true
-
- name: Build projects
run: |
- dotnet build ./lib/quantalib.csproj --configuration Release --nologo \
- -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
+ dotnet restore
+ dotnet build ./lib/quantalib.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
@@ -324,9 +311,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- gh release create v${{ steps.gitversion.outputs.MajorMinorPatch }} \
- --title "Release ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
- --notes "Release notes for version ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
+ gh release create v${{ github.sha }} \
+ --title "Release from commit ${{ github.sha }}" \
+ --notes "Release notes for this version." \
quantower/Averages/bin/Release/Averages.dll \
quantower/Statistics/bin/Release/Statistics.dll \
quantower/Volatility/bin/Release/Volatility.dll \
diff --git a/Directory.Build.props b/Directory.Build.props
index a6c4ab71..ecf9344f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -20,9 +20,6 @@
snupkg
AnyCPU
true
- true
- true
- true
@@ -45,13 +42,14 @@
false
true
-
+
+
S1944,S2053,S2222,S2259,S2583,S2589,S3329,S3655,S3900,S3949,S3966,S4158,S4347,S5773,S6781
+
-
diff --git a/GitVersion.yml b/GitVersion.yml
index 1fa72ce7..ee6175d4 100644
--- a/GitVersion.yml
+++ b/GitVersion.yml
@@ -1,18 +1,24 @@
-next-version: 0.6.1
mode: ContinuousDelivery
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
+tag-prefix: '[vV]'
+
branches:
main:
regex: ^main$
mode: ContinuousDelivery
increment: Patch
+ track-merge-target: true
+ is-release-branch: true
dev:
regex: ^dev(elop)?(ment)?$
- mode: ContinuousDeployment
- increment: Inherit
+ mode: ContinuousDelivery
+ increment: Minor
+ track-merge-target: true
+ is-release-branch: false
+ source-branches: ['main']
ignore:
sha: []
merge-message-formats: {}
diff --git a/lib/oscillators/Stc.cs b/lib/oscillators/Stc.cs
index feb544c5..b1ab2560 100644
--- a/lib/oscillators/Stc.cs
+++ b/lib/oscillators/Stc.cs
@@ -62,8 +62,28 @@ public sealed class Stc : AbstractBase
int slowPeriod = DefaultSlowPeriod, int d1Period = DefaultD1Period,
int stcPeriod = DefaultStcPeriod)
{
- if (cyclePeriod < 1 || fastPeriod < 1 || slowPeriod < 1 || d1Period < 1 || stcPeriod < 1)
- throw new ArgumentOutOfRangeException(nameof(cyclePeriod), "All periods must be greater than 0");
+ string err = "All periods must be greater than 0";
+
+ if (cyclePeriod < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(cyclePeriod), err);
+ }
+ if (fastPeriod < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(fastPeriod), err);
+ }
+ if (slowPeriod < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(slowPeriod), err);
+ }
+ if (d1Period < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(d1Period), err);
+ }
+ if (stcPeriod < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(stcPeriod), err);
+ }
if (fastPeriod >= slowPeriod)
{
throw new ArgumentOutOfRangeException(nameof(fastPeriod), "Fast period must be less than slow period");
diff --git a/lib/quantalib.csproj b/lib/quantalib.csproj
index a5bae0db..051f3d1b 100644
--- a/lib/quantalib.csproj
+++ b/lib/quantalib.csproj
@@ -10,8 +10,8 @@
readme.md
QuanTAlib
QuanTAlib
- True
- True
+ true
+ true
QuanTAlib2.png
Apache-2.0
@@ -25,6 +25,7 @@
+