From 83fe7b27547363f7859761d0bcacccb3f1a4ab51 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Sun, 27 Oct 2024 18:27:25 +0000 Subject: [PATCH] wip: nixify --- flake.nix | 2 +- .../src/main/nuget/irt.nuspec | 27 ------------------- .../src/main/nuget/publish.sh | 21 +++++++-------- .../Izumi.RPC.Runtime.CS.IRT.csproj | 18 +++++++++++++ 4 files changed, 29 insertions(+), 39 deletions(-) delete mode 100644 idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/irt.nuspec diff --git a/flake.nix b/flake.nix index ff955087..19cd0129 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ nodejs nodePackages.npm typescript - dotnetPackages.Nuget + yarn ]; }; } diff --git a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/irt.nuspec b/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/irt.nuspec deleted file mode 100644 index 45f2b74c..00000000 --- a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/irt.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - Izumi.RPC.Runtime.CS - 0.0.1-UNSET - Izumi Framework - izumi - https://opensource.org/licenses/MIT - https://izumi.7mind.io - https://raw.githubusercontent.com/7mind/izumi/develop/idealingua-v1/idealingua-v1-runtime-rpc-c-sharp/src/main/resources/unicorn.png - false - - Preliminary C# RPC runtime for Izumi IDL Compiler - Copyright (C) 7mind - - - - - - - - - - - - - diff --git a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/publish.sh b/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/publish.sh index 858b4a98..765a9e79 100755 --- a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/publish.sh +++ b/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/publish.sh @@ -1,24 +1,23 @@ #!/usr/bin/env bash set -xe -export THISDIR="$( cd "$(dirname "$0")" ; pwd -P )" +THISDIR="$( cd "$(dirname "$0")" ; pwd -P )" pushd . cd $THISDIR rm -rf *.nupkg -NUSPEC=irt.tmp.nuspec -cat irt.nuspec | sed 's/0.0.1-UNSET/'${IDEALINGUA_VERSION}'/g' > $NUSPEC -cat $NUSPEC -nuget pack $NUSPEC -rm $NUSPEC +[[ "$CI_PULL_REQUEST" != "false" ]] && exit 0 +[[ -z "$TOKEN_NUGET" ]] && exit 0 +[[ -z "$CI_BUILD_UNIQ_SUFFIX" ]] && exit 0 -#nuget setapikey $TOKEN_NUGET +if [[ "$CI_BRANCH_TAG" =~ ^v.*$ ]] ; then + dotnet build -c Release +else + dotnet build -c Release --version-suffix "alpha.${CI_BUILD_UNIQ_SUFFIX}" +fi -for TRG in $(find . -name '*.nupkg' -type f -print) -do - dotnet nuget push $TRG -k $TOKEN_NUGET --source https://api.nuget.org/v3/index.json || exit 1 -done +find . -name '*.nupkg' -type f -exec dotnet nuget push {} -k "${TOKEN_NUGET}" --source https://api.nuget.org/v3/index.json \; popd diff --git a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/solution/Izumi.RPC.Runtime.CS.IRT/Izumi.RPC.Runtime.CS.IRT.csproj b/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/solution/Izumi.RPC.Runtime.CS.IRT/Izumi.RPC.Runtime.CS.IRT.csproj index 39d3800f..55aa80da 100644 --- a/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/solution/Izumi.RPC.Runtime.CS.IRT/Izumi.RPC.Runtime.CS.IRT.csproj +++ b/idealingua-v1/idealingua-v1-runtime-rpc-csharp/src/main/nuget/solution/Izumi.RPC.Runtime.CS.IRT/Izumi.RPC.Runtime.CS.IRT.csproj @@ -13,6 +13,24 @@ false false true + + + Izumi.RPC.Runtime.CS + Septimal Mind + Septimal Mind Ltd + Idealingua-v1 + IDL;RPC;7mind + true + MIT + + true + true + snupkg + true + README.md + + +