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:
parent
ca491924ae
commit
c50615d8d1
@ -29,10 +29,10 @@
|
|||||||
# HQ| ${{ runner.os }}-nuget-
|
# HQ| ${{ runner.os }}-nuget-
|
||||||
|
|
||||||
# TW| - name: Restore dependencies
|
# TW| - name: Restore dependencies
|
||||||
# YJ| run: dotnet restore Fengling.Console.csproj
|
# YJ| run: dotnet restore src/Fengling.Console.csproj
|
||||||
|
|
||||||
# HJ| - name: Build
|
# 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
|
# 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
|
||||||
|
|||||||
@ -19,25 +19,24 @@
|
|||||||
# VQ| - name: Set up Docker Buildx
|
# VQ| - name: Set up Docker Buildx
|
||||||
# PZ| uses: docker/setup-buildx-action@v3
|
# PZ| uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# XR| - name: Extract version
|
# MR| - name: Extract version
|
||||||
# MR| id: version
|
# JM| id: version
|
||||||
# JM| run: |
|
# KK| run: |
|
||||||
# KK| VERSION=${{ github.ref_name }}
|
# QR| VERSION=${{ github.ref_name }}
|
||||||
# QR| if [[ $VERSION == v* ]]; then
|
# JZ| if [[ $VERSION == v* ]]; then
|
||||||
# JZ| VERSION=${VERSION#v}
|
# HQ| VERSION=${VERSION#v}
|
||||||
# HQ| fi
|
# TW| fi
|
||||||
# TW| echo "version=$VERSION" >> $GITHUB_OUTPUT
|
# YJ| echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
# YJ| shell: bash
|
|
||||||
|
|
||||||
# HJ| - name: Login to Gitea
|
# VQ| - name: Login to Gitea
|
||||||
# ZJ| uses: docker/login-action@v3
|
# PZ| uses: docker/login-action@v3
|
||||||
# ZW| with:
|
# RJ| with:
|
||||||
# XK| registry: ${{ env.REGISTRY }}
|
# KK| registry: ${{ env.REGISTRY }}
|
||||||
# QN| username: fengling
|
# XQ| username: fengling
|
||||||
# SK| password: ${{ secrets.GITEATOKEN }}
|
# SK| password: ${{ secrets.GITEATOKEN }}
|
||||||
|
|
||||||
# VW| - name: Extract metadata
|
# MR| - name: Extract metadata
|
||||||
# JX| id: meta
|
# JM| id: meta
|
||||||
# KY| uses: docker/metadata-action@v5
|
# KY| uses: docker/metadata-action@v5
|
||||||
# XK| with:
|
# XK| with:
|
||||||
# QN| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
# QN| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
@ -47,11 +46,12 @@
|
|||||||
# VK| type=raw,value=latest,enable={{is_default_branch}}
|
# VK| type=raw,value=latest,enable={{is_default_branch}}
|
||||||
# WQ| type=raw,value=${{ steps.version.outputs.version }}
|
# WQ| type=raw,value=${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
# XM| - name: Build and push
|
# HJ| - name: Build and push
|
||||||
# YN| uses: docker/build-push-action@v5
|
# ZJ| uses: docker/build-push-action@v5
|
||||||
# ZK| with:
|
# ZK| with:
|
||||||
# AQ| context: .
|
# AQ| context: .
|
||||||
# HB| push: true
|
# HB| dockerfile: src/Dockerfile
|
||||||
|
# ZY| push: true
|
||||||
# ZY| tags: ${{ steps.meta.outputs.tags }}
|
# ZY| tags: ${{ steps.meta.outputs.tags }}
|
||||||
# NQ| labels: ${{ steps.meta.outputs.labels }}
|
# NQ| labels: ${{ steps.meta.outputs.labels }}
|
||||||
# JK| build-args: |
|
# JK| build-args: |
|
||||||
|
|||||||
9
Fengling.Console.slnx
Normal file
9
Fengling.Console.slnx
Normal 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>
|
||||||
@ -7,8 +7,8 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY ["fengling-console/Fengling.Console.csproj", "fengling-console/"]
|
COPY ["fengling-console/src/Fengling.Console.csproj", "fengling-console/"]
|
||||||
COPY ["fengling-gateway/YarpGateway.csproj", "fengling-gateway/"]
|
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.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-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/"]
|
COPY ["fengling-service-discovery/Fengling.ServiceDiscovery.Core/Fengling.ServiceDiscovery.Core.csproj", "fengling-service-discovery/Fengling.ServiceDiscovery.Core/"]
|
||||||
@ -26,4 +26,4 @@ RUN dotnet publish "./Fengling.Console.csproj" -c $BUILD_CONFIGURATION -o /app/p
|
|||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "Fengling.Console.dll"]
|
ENTRYPOINT ["dotnet", "Fengling.Console.dll"]
|
||||||
@ -33,9 +33,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- <ProjectReference Include="..\Fengling.AuthService\Fengling.AuthService.csproj" />-->
|
<ProjectReference Include="../../fengling-gateway/src/YarpGateway.csproj" />
|
||||||
<ProjectReference Include="../fengling-gateway/src/YarpGateway.csproj" />
|
<ProjectReference Include="../../fengling-platform/Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj" />
|
||||||
<ProjectReference Include="../fengling-platform/Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Loading…
Reference in New Issue
Block a user