refactor: 将项目文件迁移到 src 目录并创建 slnx 解决方案

- 将 Controllers, Services, Models, Properties 等目录移至 src/ 下
- 创建 Fengling.Console.slnx Rider 解决方案文件
- 更新 csproj 中的项目引用路径
- 修复 CI/CD 配置:
  - build.yml: 更新项目路径为 src/Fengling.Console.csproj
  - docker.yml: 添加 Dockerfile 路径指向 src/Dockerfile
  - Dockerfile: 修复 COPY 路径以匹配新的目录结构

Closes #重构项目结构
This commit is contained in:
movingsam 2026-02-28 18:04:16 +08:00
parent ca491924ae
commit c50615d8d1
42 changed files with 36 additions and 28 deletions

View File

@ -29,10 +29,10 @@
# HQ| ${{ runner.os }}-nuget-
# TW| - name: Restore dependencies
# YJ| run: dotnet restore Fengling.Console.csproj
# YJ| run: dotnet restore src/Fengling.Console.csproj
# HJ| - name: Build
# ZJ| run: dotnet build Fengling.Console.csproj --configuration Release --no-restore
# ZJ| run: dotnet build src/Fengling.Console.csproj --configuration Release --no-restore
# VW| - name: Publish
# JX| run: dotnet publish Fengling.Console.csproj --configuration Release --no-build -o ./publish
# JX| run: dotnet publish src/Fengling.Console.csproj --configuration Release --no-build -o ./publish

View File

@ -19,25 +19,24 @@
# VQ| - name: Set up Docker Buildx
# PZ| uses: docker/setup-buildx-action@v3
# XR| - name: Extract version
# MR| id: version
# JM| run: |
# KK| VERSION=${{ github.ref_name }}
# QR| if [[ $VERSION == v* ]]; then
# JZ| VERSION=${VERSION#v}
# HQ| fi
# TW| echo "version=$VERSION" >> $GITHUB_OUTPUT
# YJ| shell: bash
# MR| - name: Extract version
# JM| id: version
# KK| run: |
# QR| VERSION=${{ github.ref_name }}
# JZ| if [[ $VERSION == v* ]]; then
# HQ| VERSION=${VERSION#v}
# TW| fi
# YJ| echo "version=$VERSION" >> $GITHUB_OUTPUT
# HJ| - name: Login to Gitea
# ZJ| uses: docker/login-action@v3
# ZW| with:
# XK| registry: ${{ env.REGISTRY }}
# QN| username: fengling
# VQ| - name: Login to Gitea
# PZ| uses: docker/login-action@v3
# RJ| with:
# KK| registry: ${{ env.REGISTRY }}
# XQ| username: fengling
# SK| password: ${{ secrets.GITEATOKEN }}
# VW| - name: Extract metadata
# JX| id: meta
# MR| - name: Extract metadata
# JM| id: meta
# KY| uses: docker/metadata-action@v5
# XK| with:
# QN| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@ -47,11 +46,12 @@
# VK| type=raw,value=latest,enable={{is_default_branch}}
# WQ| type=raw,value=${{ steps.version.outputs.version }}
# XM| - name: Build and push
# YN| uses: docker/build-push-action@v5
# HJ| - name: Build and push
# ZJ| uses: docker/build-push-action@v5
# ZK| with:
# AQ| context: .
# HB| push: true
# HB| dockerfile: src/Dockerfile
# ZY| push: true
# ZY| tags: ${{ steps.meta.outputs.tags }}
# NQ| labels: ${{ steps.meta.outputs.labels }}
# JK| build-args: |

9
Fengling.Console.slnx Normal file
View File

@ -0,0 +1,9 @@
<Solution>
<Folder Name="/items/">
<File Path=".gitea\workflows\docker.yml" />
<File Path="Dockerfile" />
</Folder>
<Folder Name="/src/">
<Project Path="src/Fengling.Console.csproj" />
</Folder>
</Solution>

View File

@ -7,8 +7,8 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["fengling-console/Fengling.Console.csproj", "fengling-console/"]
COPY ["fengling-gateway/YarpGateway.csproj", "fengling-gateway/"]
COPY ["fengling-console/src/Fengling.Console.csproj", "fengling-console/"]
COPY ["fengling-gateway/src/YarpGateway.csproj", "fengling-gateway/"]
COPY ["fengling-platform/Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj", "fengling-platform/Fengling.Platform.Infrastructure/"]
COPY ["fengling-platform/Fengling.Platform.Domain/Fengling.Platform.Domain.csproj", "fengling-platform/Fengling.Platform.Domain/"]
COPY ["fengling-service-discovery/Fengling.ServiceDiscovery.Core/Fengling.ServiceDiscovery.Core.csproj", "fengling-service-discovery/Fengling.ServiceDiscovery.Core/"]

View File

@ -33,9 +33,8 @@
</ItemGroup>
<ItemGroup>
<!-- <ProjectReference Include="..\Fengling.AuthService\Fengling.AuthService.csproj" />-->
<ProjectReference Include="../fengling-gateway/src/YarpGateway.csproj" />
<ProjectReference Include="../fengling-platform/Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj" />
<ProjectReference Include="../../fengling-gateway/src/YarpGateway.csproj" />
<ProjectReference Include="../../fengling-platform/Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj" />
</ItemGroup>
</Project>