chore: Bump version to 1.1.0 - Add automated deployment system, versioning, and comprehensive documentation
This commit is contained in:
@@ -1,78 +1,92 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
|
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
|
||||||
|
|
||||||
<!-- Docker Publishing -->
|
<!-- Docker Publishing -->
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<DockerfileContext>.</DockerfileContext>
|
<DockerfileContext>.</DockerfileContext>
|
||||||
|
<!--
|
||||||
|
Versioning - Semantic Versioning (https://semver.org/)
|
||||||
|
Format: MAJOR.MINOR.PATCH
|
||||||
|
- MAJOR: Breaking changes (incompatible API changes)
|
||||||
|
- MINOR: New features (backward-compatible)
|
||||||
|
- PATCH: Bug fixes (backward-compatible)
|
||||||
|
|
||||||
<!-- Auto-versioning -->
|
Esempio workflow:
|
||||||
<Version>1.0.0</Version>
|
- 1.0.0 -> 1.0.1 (bug fix)
|
||||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
- 1.0.1 -> 1.1.0 (new feature)
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
- 1.1.0 -> 2.0.0 (breaking change)
|
||||||
|
-->
|
||||||
|
<Version>1.1.0</Version>
|
||||||
|
<AssemblyVersion>1.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>1.1.0.0</FileVersion>
|
||||||
|
<!-- Assembly Information -->
|
||||||
|
<Product>TradingBot</Product>
|
||||||
|
<Description>Automated Crypto Trading Bot with Blazor UI</Description>
|
||||||
|
<Copyright>Copyright © 2024 Alby96</Copyright>
|
||||||
|
<Company>Alby96</Company>
|
||||||
|
<Authors>Alby96</Authors>
|
||||||
|
<!-- Build Metadata -->
|
||||||
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<InformationalVersion>$(Version)+$(GITHUB_SHA)</InformationalVersion>
|
||||||
<!-- Gitea Registry -->
|
<!-- Gitea Registry -->
|
||||||
<ContainerRegistry>gitea.encke-hake.ts.net</ContainerRegistry>
|
<ContainerRegistry>gitea.encke-hake.ts.net</ContainerRegistry>
|
||||||
<ContainerRepository>alby96/encelado/tradingbot</ContainerRepository>
|
<ContainerRepository>alby96/encelado/tradingbot</ContainerRepository>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Folders for organization -->
|
<!-- Folders for organization -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Properties\PublishProfiles\" />
|
<Folder Include="Properties\PublishProfiles\" />
|
||||||
<Folder Include="docs\deployment\" />
|
<Folder Include="docs\deployment\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Post-Publish Target: Push to Gitea Container Registry
|
Post-Publish Target: Push to Gitea Container Registry
|
||||||
|
|
||||||
IMPORTANTE: Questo target si attiva DOPO il Docker build di Visual Studio.
|
Crea automaticamente 3 tag per ogni publish:
|
||||||
Il messaggio di errore "ContainerBuild target not found" è un falso positivo
|
1. latest - Sempre ultima versione
|
||||||
e può essere ignorato - il push su Gitea funziona correttamente.
|
2. {Version} - Versione semantica (es. 1.0.0)
|
||||||
|
3. {Version}-{Date} - Versione + timestamp (es. 1.0.0-20241217)
|
||||||
|
|
||||||
Condizioni di attivazione:
|
Condizioni di attivazione:
|
||||||
1. Configuration = Release
|
- Configuration = Release
|
||||||
2. Non siamo dentro un container Docker
|
- Non dentro container Docker
|
||||||
3. Profilo Docker in uso (DockerPublish = 'true')
|
- Profilo Docker in uso
|
||||||
-->
|
-->
|
||||||
<Target Name="PushToGiteaRegistry"
|
<Target Name="PushToGiteaRegistry" AfterTargets="Publish" Condition="'$(Configuration)' == 'Release' And '$(DOTNET_RUNNING_IN_CONTAINER)' != 'true' And '$(DockerPublish)' == 'true'">
|
||||||
AfterTargets="Publish"
|
|
||||||
Condition="'$(Configuration)' == 'Release' And '$(DOTNET_RUNNING_IN_CONTAINER)' != 'true' And '$(DockerPublish)' == 'true'">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GiteaImage>$(ContainerRegistry)/$(ContainerRepository)</GiteaImage>
|
<GiteaImage>$(ContainerRegistry)/$(ContainerRepository)</GiteaImage>
|
||||||
|
<BuildDate>$([System.DateTime]::Now.ToString("yyyyMMdd"))</BuildDate>
|
||||||
|
<VersionedTag>$(Version)-$(BuildDate)</VersionedTag>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
<Message Importance="high" Text="========================================" />
|
<Message Importance="high" Text="========================================" />
|
||||||
<Message Importance="high" Text="📤 Gitea Container Registry Push" />
|
<Message Importance="high" Text="📤 Gitea Container Registry Push" />
|
||||||
<Message Importance="high" Text="========================================" />
|
<Message Importance="high" Text="========================================" />
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
<Message Importance="high" Text="🏷️ Tagging images..." />
|
<Message Importance="high" Text="📦 Version: $(Version)" />
|
||||||
|
<Message Importance="high" Text="📅 Build Date: $(BuildDate)" />
|
||||||
<!-- Tag with 'latest' -->
|
<Message Importance="high" Text="" />
|
||||||
<Exec Command="docker tag tradingbot:latest $(GiteaImage):latest"
|
<Message Importance="high" Text="🏷️ Creating tags..." />
|
||||||
ContinueOnError="false" />
|
<!-- Tag 1: latest -->
|
||||||
|
<Exec Command="docker tag tradingbot:latest $(GiteaImage):latest" ContinueOnError="false" />
|
||||||
<!-- Tag with version -->
|
<Message Importance="high" Text=" ✅ latest" />
|
||||||
<Exec Command="docker tag tradingbot:latest $(GiteaImage):$(Version)"
|
<!-- Tag 2: Version (semantic) -->
|
||||||
ContinueOnError="false" />
|
<Exec Command="docker tag tradingbot:latest $(GiteaImage):$(Version)" ContinueOnError="false" />
|
||||||
|
<Message Importance="high" Text=" ✅ $(Version)" />
|
||||||
<Message Importance="high" Text="✅ Tagged successfully" />
|
<!-- Tag 3: Version-Date -->
|
||||||
|
<Exec Command="docker tag tradingbot:latest $(GiteaImage):$(VersionedTag)" ContinueOnError="false" />
|
||||||
|
<Message Importance="high" Text=" ✅ $(VersionedTag)" />
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
<Message Importance="high" Text="📤 Pushing to $(ContainerRegistry)..." />
|
<Message Importance="high" Text="📤 Pushing to $(ContainerRegistry)..." />
|
||||||
|
<!-- Push all tags -->
|
||||||
<!-- Push 'latest' -->
|
<Exec Command="docker push $(GiteaImage):latest" ContinueOnError="false" />
|
||||||
<Exec Command="docker push $(GiteaImage):latest"
|
<Message Importance="high" Text=" ✅ Pushed: latest" />
|
||||||
ContinueOnError="false" />
|
<Exec Command="docker push $(GiteaImage):$(Version)" ContinueOnError="false" />
|
||||||
|
<Message Importance="high" Text=" ✅ Pushed: $(Version)" />
|
||||||
<!-- Push versioned -->
|
<Exec Command="docker push $(GiteaImage):$(VersionedTag)" ContinueOnError="false" />
|
||||||
<Exec Command="docker push $(GiteaImage):$(Version)"
|
<Message Importance="high" Text=" ✅ Pushed: $(VersionedTag)" />
|
||||||
ContinueOnError="false" />
|
|
||||||
|
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
<Message Importance="high" Text="========================================" />
|
<Message Importance="high" Text="========================================" />
|
||||||
<Message Importance="high" Text="✅ Successfully pushed to Gitea Registry!" />
|
<Message Importance="high" Text="✅ Successfully pushed to Gitea Registry!" />
|
||||||
@@ -81,6 +95,7 @@
|
|||||||
<Message Importance="high" Text="📦 Published images:" />
|
<Message Importance="high" Text="📦 Published images:" />
|
||||||
<Message Importance="high" Text=" - $(GiteaImage):latest" />
|
<Message Importance="high" Text=" - $(GiteaImage):latest" />
|
||||||
<Message Importance="high" Text=" - $(GiteaImage):$(Version)" />
|
<Message Importance="high" Text=" - $(GiteaImage):$(Version)" />
|
||||||
|
<Message Importance="high" Text=" - $(GiteaImage):$(VersionedTag)" />
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
<Message Importance="high" Text="🌐 Verify at:" />
|
<Message Importance="high" Text="🌐 Verify at:" />
|
||||||
<Message Importance="high" Text=" https://$(ContainerRegistry)/Alby96/Encelado/-/packages" />
|
<Message Importance="high" Text=" https://$(ContainerRegistry)/Alby96/Encelado/-/packages" />
|
||||||
@@ -90,5 +105,4 @@
|
|||||||
<Message Importance="high" Text=" The Docker image has been successfully pushed to Gitea Registry!" />
|
<Message Importance="high" Text=" The Docker image has been successfully pushed to Gitea Registry!" />
|
||||||
<Message Importance="high" Text="" />
|
<Message Importance="high" Text="" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user