diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-02 01:06:19 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-02 01:06:19 +0200 |
commit | 95d4a7a0dc38282c994789883be509225fbc9fa4 (patch) | |
tree | c3a7eacaba43b6db314803386580da8d8bf73c8f /nixops/scripts/push_deployment | |
parent | 97953ca44b0438d6b366d610678906944ea63835 (diff) | |
download | Nix-95d4a7a0dc38282c994789883be509225fbc9fa4.tar.gz Nix-95d4a7a0dc38282c994789883be509225fbc9fa4.tar.zst Nix-95d4a7a0dc38282c994789883be509225fbc9fa4.zip |
Fix scripts environment and upgrade nixops
Diffstat (limited to 'nixops/scripts/push_deployment')
-rwxr-xr-x | nixops/scripts/push_deployment | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nixops/scripts/push_deployment b/nixops/scripts/push_deployment index c8c34ee..067b665 100755 --- a/nixops/scripts/push_deployment +++ b/nixops/scripts/push_deployment | |||
@@ -1,16 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" | 3 | DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" |
4 | |||
5 | if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then | 4 | if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then |
6 | echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path" | 5 | echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path" |
7 | exit 1; | 6 | exit 1; |
8 | fi | 7 | fi |
9 | |||
10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | 8 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
11 | source $(dirname $(dirname $DIR))/nix_path_env | ||
12 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | ||
13 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
14 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
11 | source $(dirname $(dirname $DIR))/nix_path_env | ||
12 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | ||
15 | 13 | ||
16 | $nixops export | pass insert -m $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment | 14 | $nixops export | pass insert -m $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment |