diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-08 01:00:50 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-08 01:00:50 +0200 |
commit | 7ff0f7be4890ffd5d6af614fcade3d64eaa66ffc (patch) | |
tree | bc85df41a9a21e7448da54ee57be9f732a271dc2 /nixops | |
parent | f5761aac8dbfb4af91c232f2b52d1353c899abda (diff) | |
download | Nix-7ff0f7be4890ffd5d6af614fcade3d64eaa66ffc.tar.gz Nix-7ff0f7be4890ffd5d6af614fcade3d64eaa66ffc.tar.zst Nix-7ff0f7be4890ffd5d6af614fcade3d64eaa66ffc.zip |
Improve makefile recipes
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/Makefile | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/nixops/Makefile b/nixops/Makefile index e52e973..c521682 100644 --- a/nixops/Makefile +++ b/nixops/Makefile | |||
@@ -27,11 +27,16 @@ setup: | |||
27 | .PHONY: setup | 27 | .PHONY: setup |
28 | 28 | ||
29 | ###### Nixops regular tasks | 29 | ###### Nixops regular tasks |
30 | TARGET ?= | ||
30 | NIXOPS_ARGS ?= | 31 | NIXOPS_ARGS ?= |
32 | ifdef TARGET | ||
33 | override NIXOPS_ARGS +=--include=$(TARGET) | ||
34 | endif | ||
35 | SSH_ARGS ?= | ||
36 | |||
31 | nixops: | 37 | nixops: |
32 | $(NIXOPS_PRIV) $(NIXOPS_ARGS) | 38 | $(NIXOPS_PRIV) $(NIXOPS_ARGS) |
33 | 39 | ||
34 | SSH_ARGS ?= | ||
35 | ssh-eldiron: | 40 | ssh-eldiron: |
36 | $(NIXOPS_PRIV) ssh eldiron -- $(SSH_ARGS) | 41 | $(NIXOPS_PRIV) ssh eldiron -- $(SSH_ARGS) |
37 | 42 | ||
@@ -49,25 +54,25 @@ info: | |||
49 | $(NIXOPS_PRIV) info | 54 | $(NIXOPS_PRIV) info |
50 | 55 | ||
51 | debug: | 56 | debug: |
52 | $(NIXOPS_PRIV) deploy --build-only --show-trace | 57 | $(NIXOPS_PRIV) deploy --build-only --show-trace $(NIXOPS_ARGS) |
53 | 58 | ||
54 | dry-run: | 59 | dry-run: |
55 | $(NIXOPS_PRIV) deploy --dry-run | 60 | $(NIXOPS_PRIV) deploy --dry-run $(NIXOPS_ARGS) |
56 | 61 | ||
57 | build: | 62 | build: |
58 | $(NIXOPS_PRIV) deploy --build-only --max-jobs 1 | 63 | $(NIXOPS_PRIV) deploy --build-only $(NIXOPS_ARGS) |
59 | 64 | ||
60 | upload: | 65 | upload: |
61 | $(NIXOPS_PRIV) deploy --copy-only | 66 | $(NIXOPS_PRIV) deploy --copy-only $(NIXOPS_ARGS) |
62 | 67 | ||
63 | deploy: | 68 | deploy: |
64 | $(NIXOPS_PRIV) deploy | 69 | $(NIXOPS_PRIV) deploy $(NIXOPS_ARGS) |
65 | 70 | ||
66 | deploy-reboot: | 71 | deploy-reboot: |
67 | $(NIXOPS_PRIV) deploy --force-reboot | 72 | $(NIXOPS_PRIV) deploy --force-reboot $(NIXOPS_ARGS) |
68 | 73 | ||
69 | reboot: | 74 | reboot: |
70 | $(NIXOPS_PRIV) reboot --include=eldiron | 75 | $(NIXOPS_PRIV) reboot --include=$(TARGET) |
71 | .PHONY: nixops ssh-eldiron info debug dry-run build upload deploy deploy-reboot reboot | 76 | .PHONY: nixops ssh-eldiron info debug dry-run build upload deploy deploy-reboot reboot |
72 | 77 | ||
73 | ###### Cleanup generations and garbage collection | 78 | ###### Cleanup generations and garbage collection |