diff options
Diffstat (limited to 'nixops/scripts/pull_deployment')
-rwxr-xr-x | nixops/scripts/pull_deployment | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/nixops/scripts/pull_deployment b/nixops/scripts/pull_deployment deleted file mode 100755 index 08b9915..0000000 --- a/nixops/scripts/pull_deployment +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" | ||
4 | if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then | ||
5 | echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path" | ||
6 | exit 1; | ||
7 | fi | ||
8 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | ||
10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | ||
11 | source $(dirname $(dirname $DIR))/scripts/nix_env | ||
12 | |||
13 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | ||
14 | |||
15 | if nixops_custom info -d $DeploymentUuid 2>/dev/null >/dev/null; then | ||
16 | cat <<EOF | ||
17 | This will remove your current deployment file and recreate it! | ||
18 | Continue? [y/N] | ||
19 | EOF | ||
20 | read y | ||
21 | if [ "$y" = "y" -o "$y" = "Y" ]; then | ||
22 | nixops_custom delete --force -d $DeploymentUuid | ||
23 | else | ||
24 | echo "Aborting" | ||
25 | exit 1 | ||
26 | fi | ||
27 | fi | ||
28 | |||
29 | deployment=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment) | ||
30 | |||
31 | echo "$deployment" | nixops_custom import | ||
32 | |||
33 | nixops_custom modify -d "$DeploymentUuid" "$(dirname $DIR)/default.nix" | ||