diff --git a/Polonium.Generators.csproj b/Polonium.Generators.csproj index e8c9133..36e5c8a 100644 --- a/Polonium.Generators.csproj +++ b/Polonium.Generators.csproj @@ -1,5 +1,5 @@ - + netstandard2.0 true @@ -8,7 +8,7 @@ true true true - 0.1.1-x + $(PoloniumGeneratorsVersion) Hangman Polonium.Generators true diff --git a/publish b/publish old mode 100644 new mode 100755 index d4b9c95..0dfe669 --- a/publish +++ b/publish @@ -1,2 +1,12 @@ #!/bin/bash -dotnet nuget push "$(ls -t ./bin/Debug/Polonium.Generators.*.nupkg | head -n 1)" --source hangman-lab \ No newline at end of file + +SCRIPT_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/ +LATEST_PACKAGE=$(ls -t "${SCRIPT_DIR}"bin/Debug/Polonium.Generators.*.nupkg 2>/dev/null | head -n 1) + +if [[ -z "$LATEST_PACKAGE" ]]; then + echo "❌ Error: No .nupkg file found in ${SCRIPT_DIR}/bin/Debug/" + exit 1 +fi +echo "🚀 Pushing NuGet package: $LATEST_PACKAGE" +dotnet nuget push "$LATEST_PACKAGE" --source hangman-lab +