2022-04-03 18:26:19 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
2022-09-08 04:11:56 +02:00
|
|
|
if [[ -n "$PATH_TO_FLAKE_DIR" ]]; then
|
|
|
|
cd "$PATH_TO_FLAKE_DIR"
|
|
|
|
fi
|
|
|
|
|
2022-04-03 18:26:19 +02:00
|
|
|
if [[ -n "$TARGETS" ]]; then
|
|
|
|
inputs=()
|
|
|
|
for input in $TARGETS; do
|
|
|
|
inputs+=("--update-input" "$input")
|
|
|
|
done
|
|
|
|
nix flake lock "${inputs[@]}" --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
|
|
|
else
|
|
|
|
nix flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
|
|
|
fi
|