mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2024-12-23 13:32:07 +01:00
16 lines
415 B
Bash
Executable file
16 lines
415 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ -n "$PATH_TO_FLAKE_DIR" ]]; then
|
|
cd "$PATH_TO_FLAKE_DIR"
|
|
fi
|
|
|
|
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
|