From 875e88dae3d80584b40be7f36e0fc5e0ac719557 Mon Sep 17 00:00:00 2001 From: Roman Vanicek Date: Tue, 1 Oct 2024 14:29:09 +0200 Subject: [PATCH] Rename to IvDllExports and build on linux --- .drone,yml | 38 +++++++++++++++++++ DllExports.MSBuild/DllExports.MSBuild.csproj | 4 +- .../{DllExports.props => IvDllExports.props} | 0 ...llExports.targets => IvDllExports.targets} | 0 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .drone,yml rename DllExports.MSBuild/build/{DllExports.props => IvDllExports.props} (100%) rename DllExports.MSBuild/build/{DllExports.targets => IvDllExports.targets} (100%) diff --git a/.drone,yml b/.drone,yml new file mode 100644 index 0000000..b471a16 --- /dev/null +++ b/.drone,yml @@ -0,0 +1,38 @@ +kind: pipeline +name: default + +steps: + - name: build + image: mcr.microsoft.com/dotnet/sdk:8.0 + settings: + nuget_apikey: + from_secret: drone_release + nuget_uri: https://git.ivasoft.cz/api/packages/Ivasoft/nuget/index.json + commands: + - dotnet build --configuration Release DllExports/DllExports.csproj + - dotnet build --configuration Release DllExports.MSBuild/DllExports.MSBuild.csproj + - dotnet pack --configuration Release DllExports.MSBuild/DllExports.MSBuild.csproj + ## Following is based on build.ps1 + - unzip -d DllExports.MSBuild/bin/Release/nupkg DllExports.MSBuild/bin/Release/IvDllExports.0.1.1.nupkg + - cp -r DllExports.MSBuild/bin/Release/nupkg/lib DllExports.MSBuild/bin/Release/nupkg/tasks + - find DllExports.MSBuild/bin/Release/nupkg/lib ! -name 'DllExports.dll' -type f -exec rm -f {} + + # Tasks are not supported on netstandard2.0 + - rm -rf DllExports.MSBuild/bin/Release/nupkg/tasks/netstandard2.0 + # We don't need libs for net472 and net5.0 + - rm -rf DllExports.MSBuild/bin/Release/nupkg/lib/net472 + - rm -rf DllExports.MSBuild/bin/Release/nupkg/lib/net5.0 + - sed -i -E '/(NETFramework4.7.2|net5.0)/d' DllExports.MSBuild/bin/Release/nupkg/IvDllExports.nuspec + # Re-pack + - rm DllExports.MSBuild/bin/Release/IvDllExports.0.1.1.nupkg + - (cd DllExports.MSBuild/bin/Release/nupkg; zip -r ../IvDllExports.0.1.1.nupkg ./) + + - name: release + image: mcr.microsoft.com/dotnet/sdk:8.0 + settings: + nuget_apikey: + from_secret: drone_release + nuget_uri: https://git.ivasoft.cz/api/packages/Ivasoft/nuget/index.json + commands: + - dotnet nuget push DllExports.MSBuild/bin/Release/IvDllExports.0.1.1.nupkg --api-key $$PLUGIN_NUGET_APIKEY --source $$PLUGIN_NUGET_URI --skip-duplicate + when: + event: tag \ No newline at end of file diff --git a/DllExports.MSBuild/DllExports.MSBuild.csproj b/DllExports.MSBuild/DllExports.MSBuild.csproj index 6ff7db4..aaa68c3 100644 --- a/DllExports.MSBuild/DllExports.MSBuild.csproj +++ b/DllExports.MSBuild/DllExports.MSBuild.csproj @@ -6,8 +6,8 @@ net472;netstandard2.0;net5.0 true - DllExports - DllExports + IvDllExports + IvDllExports lordmilko Unmanaged Exports for legacy/SDK style projects false diff --git a/DllExports.MSBuild/build/DllExports.props b/DllExports.MSBuild/build/IvDllExports.props similarity index 100% rename from DllExports.MSBuild/build/DllExports.props rename to DllExports.MSBuild/build/IvDllExports.props diff --git a/DllExports.MSBuild/build/DllExports.targets b/DllExports.MSBuild/build/IvDllExports.targets similarity index 100% rename from DllExports.MSBuild/build/DllExports.targets rename to DllExports.MSBuild/build/IvDllExports.targets