Skip to content

Commit

Permalink
merge hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Dec 31, 2023
2 parents 6decdfb + dc8fc65 commit d2a252d
Show file tree
Hide file tree
Showing 132 changed files with 4,349 additions and 9,870 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: etherna/etherna-credit
tags: |
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: etherna/etherna-credit
tags: |
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
54 changes: 26 additions & 28 deletions .github/workflows/unstable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,39 @@ name: Unstable release on Docker Hub
on:
push:
branches:
- dev
- 'hotfix/**'
- 'release/**'
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: etherna/etherna-credit
tags: |
type=ref,event=branch
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: etherna/etherna-credit
tags: |
type=ref,event=branch
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh
RUN chmod 500 nsolid_setup_deb.sh
RUN ./nsolid_setup_deb.sh 20
RUN apt-get install nodejs -y
WORKDIR /src
COPY . .
RUN dotnet restore "EthernaCredit.sln"
Expand Down
10 changes: 9 additions & 1 deletion EthernaCredit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
Dockerfile = Dockerfile
EthernaCredit.sln.licenseheader = EthernaCredit.sln.licenseheader
LICENSE = LICENSE
nuget.config = nuget.config
README.md = README.md
Expand All @@ -35,6 +34,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\unstable-release.yml = .github\workflows\unstable-release.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{17CA394F-7E22-4654-A7E6-93D2DDD49C4F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EthernaCredit.Persistence.Tests", "test\EthernaCredit.Persistence.Tests\EthernaCredit.Persistence.Tests.csproj", "{D6BF7556-84A4-4DC4-9120-BDFE249E1D45}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -57,6 +60,10 @@ Global
{270D03AE-3F41-4EC6-9FB8-10E050F7384F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{270D03AE-3F41-4EC6-9FB8-10E050F7384F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{270D03AE-3F41-4EC6-9FB8-10E050F7384F}.Release|Any CPU.Build.0 = Release|Any CPU
{D6BF7556-84A4-4DC4-9120-BDFE249E1D45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6BF7556-84A4-4DC4-9120-BDFE249E1D45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6BF7556-84A4-4DC4-9120-BDFE249E1D45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6BF7556-84A4-4DC4-9120-BDFE249E1D45}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -69,6 +76,7 @@ Global
{FD6B74E2-E724-4CAA-9888-51B366BFBCEE} = {E57379A3-D247-4A43-9EC9-FB300A683E12}
{270D03AE-3F41-4EC6-9FB8-10E050F7384F} = {FD6B74E2-E724-4CAA-9888-51B366BFBCEE}
{64A1A3D7-3D00-43B2-B358-096DB512A6E7} = {9D5E69FC-70B7-41B0-89B4-72893F5C8822}
{D6BF7556-84A4-4DC4-9120-BDFE249E1D45} = {17CA394F-7E22-4654-A7E6-93D2DDD49C4F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EE6C260F-4757-4FA4-A87D-50DEC21FA9EE}
Expand Down
18 changes: 18 additions & 0 deletions EthernaCredit.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue"> Copyright 2021-present Etherna Sa

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Consts/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Etherna/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sagl/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
47 changes: 0 additions & 47 deletions EthernaCredit.sln.licenseheader

This file was deleted.

8 changes: 4 additions & 4 deletions src/EthernaCredit.Domain/EthernaCredit.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Etherna.CreditSystem.Domain</RootNamespace>

<Authors>Etherna Sagl</Authors>
<Authors>Etherna Sa</Authors>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
Expand All @@ -14,8 +14,8 @@

<ItemGroup>
<PackageReference Include="Etherna.DomainEvents" Version="1.4.0" />
<PackageReference Include="MongODM.Core" Version="0.23.1" />
<PackageReference Include="Nethereum.Util" Version="4.8.0" />
<PackageReference Include="MongODM.Core" Version="0.24.0-alpha.101" />
<PackageReference Include="Nethereum.Util" Version="4.18.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// Copyright 2021-present Etherna Sagl
//
// Copyright 2021-present Etherna Sa
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Etherna.CreditSystem.Services.Settings
using Etherna.CreditSystem.Domain.Models.OperationLogs;
using Etherna.DomainEvents;

namespace Etherna.CreditSystem.Domain.Events
{
public class ApplicationSettings
public class AdminUpdateUserBalanceEvent(AdminUpdateOperationLog operationLog) : IDomainEvent
{
// Fields.
string? _assemblyVersion;

// Properties.
public string AssemblyVersion { get => _assemblyVersion ?? "1.0.0"; set => _assemblyVersion = value; }
public AdminUpdateOperationLog OperationLog { get; } = operationLog;
}
}
}
23 changes: 7 additions & 16 deletions src/EthernaCredit.Domain/Events/UserDepositEvent.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
// Copyright 2021-present Etherna Sagl
//
// Copyright 2021-present Etherna Sa
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Etherna.CreditSystem.Domain.Models;
using Etherna.CreditSystem.Domain.Models.OperationLogs;
using Etherna.DomainEvents;

namespace Etherna.CreditSystem.Domain.Events
{
public class UserDepositEvent : IDomainEvent
public class UserDepositEvent(DepositOperationLog operationLog) : IDomainEvent
{
// Constructor.
public UserDepositEvent(decimal amount, User user)
{
Amount = amount;
User = user;
}

// Properties.
public decimal Amount { get; }
public User User { get; }
public DepositOperationLog OperationLog { get; } = operationLog;
}
}
23 changes: 7 additions & 16 deletions src/EthernaCredit.Domain/Events/UserWithdrawEvent.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
// Copyright 2021-present Etherna Sagl
//
// Copyright 2021-present Etherna Sa
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Etherna.CreditSystem.Domain.Models;
using Etherna.CreditSystem.Domain.Models.OperationLogs;
using Etherna.DomainEvents;

namespace Etherna.CreditSystem.Domain.Events
{
public class UserWithdrawEvent : IDomainEvent
public class UserWithdrawEvent(WithdrawOperationLog operationLog) : IDomainEvent
{
// Constructor.
public UserWithdrawEvent(decimal amount, User user)
{
Amount = amount;
User = user;
}

// Properties.
public decimal Amount { get; }
public User User { get; }
public WithdrawOperationLog OperationLog { get; } = operationLog;
}
}
Loading

0 comments on commit d2a252d

Please sign in to comment.