From 3bcd68eeddc8d4565409c41bb9cb28b6e2c8e2ea Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Fri, 25 Oct 2024 10:48:12 +0200 Subject: [PATCH] Follow semver 2.0 for dev builds - Switch to -build. for dev versions - Use builtin dotnet VersionSuffix property instead of custom FlecsVersionSuffix - Update README Reference: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#pre-release-versions Signed-off-by: Tomas Slusny --- .github/workflows/ci.yml | 13 +++++++------ README.md | 5 +++-- src/Directory.Build.targets | 5 ----- src/Flecs.NET.Bindings/Flecs.NET.Bindings.csproj | 2 +- src/Flecs.NET.Native/Flecs.NET.Native.csproj | 2 +- src/Flecs.NET/Flecs.NET.csproj | 4 ++-- 6 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 src/Directory.Build.targets diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49e4b209..f5433f91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: 'recursive' + fetch-depth: 0 - name: Setup .NET uses: actions/setup-dotnet@v3 @@ -52,7 +53,7 @@ jobs: shell: bash run: | if [ '${{ github.event.inputs.use-auto-generated-version }}' != 'false' ]; then - echo "FlecsVersionSuffix=-dev-$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV + echo "FlecsVersionSuffix=build.$(git rev-list --count HEAD)" >> $GITHUB_ENV fi - name: Setup Osx Environment @@ -61,7 +62,7 @@ jobs: run: | IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path) IOS_SIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path) - + echo "IOS_SDK=$IOS_SDK" >> $GITHUB_ENV echo "IOS_SIMULATOR_SDK=$IOS_SIMULATOR_SDK" >> $GITHUB_ENV @@ -92,11 +93,11 @@ jobs: shell: bash run: | if [ '${{ github.event.inputs.nuget-registry }}' == 'NuGet' ]; then - dotnet pack --property:FlecsVersionSuffix=$FlecsVersionSuffix -c Debug - dotnet pack --property:FlecsVersionSuffix=$FlecsVersionSuffix -c Release + dotnet pack --property:VersionSuffix=$FlecsVersionSuffix -c Debug + dotnet pack --property:VersionSuffix=$FlecsVersionSuffix -c Release else - dotnet pack --property:FlecsVersionSuffix=$FlecsVersionSuffix --property:FlecsPackPdb=true -c Debug - dotnet pack --property:FlecsVersionSuffix=$FlecsVersionSuffix --property:FlecsPackPdb=true -c Release + dotnet pack --property:VersionSuffix=$FlecsVersionSuffix --property:FlecsPackPdb=true -c Debug + dotnet pack --property:VersionSuffix=$FlecsVersionSuffix --property:FlecsPackPdb=true -c Release fi - name: Upload Artifacts diff --git a/README.md b/README.md index ed02bdc1..63e349f5 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,9 @@ dotnet nuget add source --name "flecs.net" --username "YOUR_GITHUB_USERNAME" --p You can now reference any package from the [GitHub feed](https://github.com/BeanCheeseBurrito?tab=packages&repo_name=Flecs.NET)! ```console -dotnet add PROJECT package Flecs.NET.Release --version 4.0.2-dev-2024-10-20-03-23-34 +dotnet add PROJECT package Flecs.NET.Release --version *-build.* ``` + ```xml @@ -111,7 +112,7 @@ dotnet add PROJECT package Flecs.NET.Release --version 4.0.2-dev-2024-10-20-03-2 - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index e1f14d18..00000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,5 +0,0 @@ - - - $(Version)$(FlecsVersionSuffix) - - diff --git a/src/Flecs.NET.Bindings/Flecs.NET.Bindings.csproj b/src/Flecs.NET.Bindings/Flecs.NET.Bindings.csproj index 421a5d86..88a57d5a 100644 --- a/src/Flecs.NET.Bindings/Flecs.NET.Bindings.csproj +++ b/src/Flecs.NET.Bindings/Flecs.NET.Bindings.csproj @@ -10,7 +10,7 @@ true true - 4.0.2 + 4.0.2 Flecs.NET.Bindings.Debug Flecs.NET.Bindings.Release BeanCheeseBurrito diff --git a/src/Flecs.NET.Native/Flecs.NET.Native.csproj b/src/Flecs.NET.Native/Flecs.NET.Native.csproj index 62e05c66..d1583730 100644 --- a/src/Flecs.NET.Native/Flecs.NET.Native.csproj +++ b/src/Flecs.NET.Native/Flecs.NET.Native.csproj @@ -10,7 +10,7 @@ true false - 4.0.2 + 4.0.2 Flecs.NET.Native.Debug Flecs.NET.Native.Release BeanCheeseBurrito diff --git a/src/Flecs.NET/Flecs.NET.csproj b/src/Flecs.NET/Flecs.NET.csproj index 068e7748..a8836046 100644 --- a/src/Flecs.NET/Flecs.NET.csproj +++ b/src/Flecs.NET/Flecs.NET.csproj @@ -20,7 +20,7 @@ true true - 4.0.2 + 4.0.2 Flecs.NET.Debug Flecs.NET.Release BeanCheeseBurrito @@ -41,7 +41,7 @@ true true - +