aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts/pull_deployment
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/scripts/pull_deployment')
-rwxr-xr-xnixops/scripts/pull_deployment33
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
3DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf"
4if [ -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;
7fi
8DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
10export NIXOPS_DEPLOYMENT="$DeploymentUuid"
11source $(dirname $(dirname $DIR))/scripts/nix_env
12
13export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
14
15if nixops_custom info -d $DeploymentUuid 2>/dev/null >/dev/null; then
16 cat <<EOF
17This will remove your current deployment file and recreate it!
18Continue? [y/N]
19EOF
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
27fi
28
29deployment=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment)
30
31echo "$deployment" | nixops_custom import
32
33nixops_custom modify -d "$DeploymentUuid" "$(dirname $DIR)/default.nix"