aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/push-to-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/push-to-store.sh')
-rwxr-xr-xtests/functional/push-to-store.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/functional/push-to-store.sh b/tests/functional/push-to-store.sh
new file mode 100755
index 000000000..9e4e475e0
--- /dev/null
+++ b/tests/functional/push-to-store.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -x
+set -e
+
+[ -n "$OUT_PATHS" ]
+[ -n "$DRV_PATH" ]
+
+echo Pushing "$OUT_PATHS" to "$REMOTE_STORE"
+if [ -n "$BUILD_HOOK_ONLY_OUT_PATHS" ]; then
+ printf "%s" "$OUT_PATHS" | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
+else
+ printf "%s" "$DRV_PATH"^'*' | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
+fi