mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-04-21 09:20:16 +03:00
feat: Added nix option
fix: nix options position Use empty list fix options
This commit is contained in:
parent
bc75a5b55e
commit
b55ee105d9
2 changed files with 14 additions and 2 deletions
|
@ -5,12 +5,19 @@ if [[ -n "$PATH_TO_FLAKE_DIR" ]]; then
|
|||
cd "$PATH_TO_FLAKE_DIR"
|
||||
fi
|
||||
|
||||
options=()
|
||||
if [[ -n "$NIX_OPTIONS" ]]; then
|
||||
for option in $NIX_OPTIONS; do
|
||||
options+=("${option}")
|
||||
done
|
||||
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"
|
||||
nix "${options[@]}" flake lock "${inputs[@]}" --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
||||
else
|
||||
nix flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
||||
nix "${options[@]}" flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue