Skip to content
Snippets Groups Projects
Select Git revision
  • dont-use-etc-hosts
  • sec
  • simplify-grafana
  • simple-docs-build
  • local-test-grid
  • develop default protected
  • no-morph-on-nodes
  • stuff
  • arion
9 results

update-deployment

Blame
  • Forked from PrivateStorage / PrivateStorageio
    1215 commits behind the upstream repository.
    update-deployment 605 B
    #!/usr/bin/env nix-shell
    #!nix-shell -i bash -p morph
    
    set -euxo pipefail
    
    GRIDNAME=$1
    shift
    
    CHECKOUT="/run/user/$(id --user)/PrivateStorageio"
    REPO="https://whetstone.privatestorage.io/privatestorage/PrivateStorageio.git"
    
    if [ -e "${CHECKOUT}" ]; then
        git -C "${CHECKOUT}" pull
    else
        git clone "${REPO}" "${CHECKOUT}"
        # Check out the right branch ... which also happens to be named after this
        # grid (or maybe this grid is named after the branch).
        git -C "${CHECKOUT}" checkout "${GRIDNAME}"
    fi
    
    morph deploy "${CHECKOUT}"/morph/grid/"${GRIDNAME}"/grid.nix switch --on "$(hostname)"