mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 11:08:05 +00:00
semver fix
This commit is contained in:
@@ -194,7 +194,7 @@ jobs:
|
|||||||
languages: 'csharp'
|
languages: 'csharp'
|
||||||
queries: security-and-quality
|
queries: security-and-quality
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
tools: latest
|
tools: linked
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
@@ -270,23 +270,10 @@ jobs:
|
|||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
||||||
restore-keys: ${{ runner.os }}-nuget-
|
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
|
- name: Build projects
|
||||||
run: |
|
run: |
|
||||||
dotnet build ./lib/quantalib.csproj --configuration Release --nologo \
|
dotnet restore
|
||||||
-p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
|
dotnet build ./lib/quantalib.csproj --configuration Release --nologo
|
||||||
dotnet build ./quantower/Averages/_Averages.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/Statistics/_Statistics.csproj --configuration Release --nologo
|
||||||
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
|
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
|
||||||
@@ -324,9 +311,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
gh release create v${{ steps.gitversion.outputs.MajorMinorPatch }} \
|
gh release create v${{ github.sha }} \
|
||||||
--title "Release ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
|
--title "Release from commit ${{ github.sha }}" \
|
||||||
--notes "Release notes for version ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
|
--notes "Release notes for this version." \
|
||||||
quantower/Averages/bin/Release/Averages.dll \
|
quantower/Averages/bin/Release/Averages.dll \
|
||||||
quantower/Statistics/bin/Release/Statistics.dll \
|
quantower/Statistics/bin/Release/Statistics.dll \
|
||||||
quantower/Volatility/bin/Release/Volatility.dll \
|
quantower/Volatility/bin/Release/Volatility.dll \
|
||||||
|
|||||||
@@ -20,9 +20,6 @@
|
|||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<IsLocalBuild Condition="'$(GITHUB_ACTIONS)' == ''">true</IsLocalBuild>
|
<IsLocalBuild Condition="'$(GITHUB_ACTIONS)' == ''">true</IsLocalBuild>
|
||||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
|
||||||
<UpdateAssemblyInfo>true</UpdateAssemblyInfo>
|
|
||||||
<GenerateGitVersionInformation>true</GenerateGitVersionInformation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
@@ -45,13 +42,14 @@
|
|||||||
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
|
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
|
||||||
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
|
<PropertyGroup>
|
||||||
<NoWarn>S1944,S2053,S2222,S2259,S2583,S2589,S3329,S3655,S3900,S3949,S3966,S4158,S4347,S5773,S6781</NoWarn>
|
<NoWarn>S1944,S2053,S2222,S2259,S2583,S2589,S3329,S3655,S3900,S3949,S3966,S4158,S4347,S5773,S6781</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
|
||||||
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.21459.1" />
|
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.21459.1" />
|
||||||
<PackageReference Include="GitVersion.MsBuild" Version="6.0.0-beta.7" PrivateAssets="All" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(IsLocalBuild)' == 'true' AND $([MSBuild]::IsOSPlatform('Windows'))">
|
<PropertyGroup Condition="'$(IsLocalBuild)' == 'true' AND $([MSBuild]::IsOSPlatform('Windows'))">
|
||||||
|
|||||||
+25
-4
@@ -1,18 +1,39 @@
|
|||||||
next-version: 0.6.1
|
workflow: GitHubFlow/v1
|
||||||
mode: ContinuousDelivery
|
assembly-versioning-scheme: MajorMinorPatch
|
||||||
|
assembly-file-versioning-scheme: MajorMinorPatch
|
||||||
major-version-bump-message: '\+semver:\s?(breaking|major)'
|
major-version-bump-message: '\+semver:\s?(breaking|major)'
|
||||||
minor-version-bump-message: '\+semver:\s?(feature|minor)'
|
minor-version-bump-message: '\+semver:\s?(feature|minor)'
|
||||||
patch-version-bump-message: '\+semver:\s?(fix|patch)'
|
patch-version-bump-message: '\+semver:\s?(fix|patch)'
|
||||||
no-bump-message: '\+semver:\s?(none|skip)'
|
no-bump-message: '\+semver:\s?(none|skip)'
|
||||||
|
tag-prefix: '[vV]'
|
||||||
|
semantic-version-format: Strict
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
main:
|
main:
|
||||||
|
label: ''
|
||||||
regex: ^main$
|
regex: ^main$
|
||||||
mode: ContinuousDelivery
|
mode: ContinuousDelivery
|
||||||
increment: Patch
|
increment: Patch
|
||||||
|
prevent-increment:
|
||||||
|
of-merged-branch: true
|
||||||
|
track-merge-target: false
|
||||||
|
track-merge-message: true
|
||||||
|
is-release-branch: true
|
||||||
|
pre-release-weight: 55000
|
||||||
|
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
|
label: beta
|
||||||
regex: ^dev(elop)?(ment)?$
|
regex: ^dev(elop)?(ment)?$
|
||||||
mode: ContinuousDeployment
|
mode: ContinuousDelivery
|
||||||
increment: Inherit
|
increment: Patch
|
||||||
|
prevent-increment:
|
||||||
|
when-current-commit-tagged: false
|
||||||
|
track-merge-target: true
|
||||||
|
is-release-branch: false
|
||||||
|
source-branches: ['main']
|
||||||
|
pre-release-weight: 30000
|
||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
sha: []
|
sha: []
|
||||||
merge-message-formats: {}
|
merge-message-formats: {}
|
||||||
|
|||||||
+22
-2
@@ -62,8 +62,28 @@ public sealed class Stc : AbstractBase
|
|||||||
int slowPeriod = DefaultSlowPeriod, int d1Period = DefaultD1Period,
|
int slowPeriod = DefaultSlowPeriod, int d1Period = DefaultD1Period,
|
||||||
int stcPeriod = DefaultStcPeriod)
|
int stcPeriod = DefaultStcPeriod)
|
||||||
{
|
{
|
||||||
if (cyclePeriod < 1 || fastPeriod < 1 || slowPeriod < 1 || d1Period < 1 || stcPeriod < 1)
|
string err = "All periods must be greater than 0";
|
||||||
throw new ArgumentOutOfRangeException(nameof(cyclePeriod), "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)
|
if (fastPeriod >= slowPeriod)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException(nameof(fastPeriod), "Fast period must be less than slow period");
|
throw new ArgumentOutOfRangeException(nameof(fastPeriod), "Fast period must be less than slow period");
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||||
<RootNamespace>QuanTAlib</RootNamespace>
|
<RootNamespace>QuanTAlib</RootNamespace>
|
||||||
<AssemblyName>QuanTAlib</AssemblyName>
|
<AssemblyName>QuanTAlib</AssemblyName>
|
||||||
<IsPublishable>True</IsPublishable>
|
<IsPublishable>true</IsPublishable>
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<PackageIcon>QuanTAlib2.png</PackageIcon>
|
<PackageIcon>QuanTAlib2.png</PackageIcon>
|
||||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||||
<PackageTags>
|
<PackageTags>
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="GitVersion.MsBuild" Version="6.0.4" PrivateAssets="All" />
|
||||||
<Compile Include="**\*.cs" Exclude="obj\**\*.cs" />
|
<Compile Include="**\*.cs" Exclude="obj\**\*.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user