2019-04-04 11:33:38 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -Eeuo pipefail
|
|
|
|
|
|
|
|
DADE_CURRENT_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
if [[ "$DADE_CURRENT_SCRIPT_DIR" =~ ^/nix/store/.* ]]; then
|
|
|
|
echo "Unable to release dev-env from Nix store. Are you running this from another repository than `da`?"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $# -eq 1 ]; then
|
|
|
|
BUMP=$1
|
|
|
|
else
|
|
|
|
BUMP=patch
|
|
|
|
fi
|
|
|
|
|
|
|
|
DADE_REPO_ROOT="$DADE_CURRENT_SCRIPT_DIR/../../"
|
|
|
|
VERSION=$(cat "$DADE_REPO_ROOT/dev-env/VERSION")
|
|
|
|
semver bump $BUMP $VERSION > "$DADE_REPO_ROOT/dev-env/VERSION"
|
2020-02-06 18:15:11 +03:00
|
|
|
# Work around sporadic segfaults. See https://github.com/digital-asset/daml/pull/4427
|
|
|
|
nix-build --option http2 false "$DADE_REPO_ROOT/nix" -A cached.dev-env --no-out-link
|