about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-11-07 22:36:50 +0100
committerRory& <root@rory.gay>2025-11-07 22:36:50 +0100
commit2cd76f916a13e66f1fdf06dd7bf5dff6be64de0b (patch)
tree74be7cbf4cbfb7749ede5325bce1f92728ece648 /scripts
parentRemove deprecated unauthenticated media uris (diff)
downloadLibMatrix-2cd76f916a13e66f1fdf06dd7bf5dff6be64de0b.tar.xz
WIP: nix CI
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fetchdeps.sh5
-rwxr-xr-xscripts/publish.sh20
2 files changed, 25 insertions, 0 deletions
diff --git a/scripts/fetchdeps.sh b/scripts/fetchdeps.sh
new file mode 100755

index 0000000..a93ff53 --- /dev/null +++ b/scripts/fetchdeps.sh
@@ -0,0 +1,5 @@ +#! /usr/bin/env sh +for p in `nix flake show --json | jq '.packages."x86_64-linux" | keys[]' -r` +do + nix build .\#${p}.passthru.fetch-deps && ./result ./${p//-/\.}/deps.json +done diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755
index 0000000..2fd910f --- /dev/null +++ b/scripts/publish.sh
@@ -0,0 +1,20 @@ +BASEDIR="$PWD" +rm ./result* *.nupkg + +for p in `nix flake show --json | jq '.packages."x86_64-linux" | keys[]' -r` +do + nix build .\#${p} -j4 -L --out-link ./result-${p//-/\.} & +done +wait + +for p in result*/share/nuget/packages/*/*/.unpacked +do + PNAME=$(basename `realpath "${p}/../.."`) + PRNAME=$(basename $(cd "${p}/../../../../../.." && echo $PWD)) + echo $PNAME: $PRNAME + cd "${p}" || continue + zip -db -ds 32k -9 -r "${BASEDIR}/${PNAME//./-}.nupkg" * + cd - + dotnet nuget push *.nupkg -k ${NUGET_KEY} --source https://api.nuget.org/v3/index.json --skip-duplicate + rm -rfv "${PRNAME}" "${PNAME//./-}.nupkg" +done \ No newline at end of file