-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hermit and docs about hermit (#1659)
Also rewrite some Rush docs from RELEASING to README. Why hermit: it removes any doubt about which node version devs use, and removes the need for nvm or a global node installation. Note that the CI builds do not use Hermit. This is because they run on multiple versions of node.
- Loading branch information
Showing
11 changed files
with
91 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Hermit | ||
.hermit | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hermit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Hermit environment | ||
|
||
This is a [Hermit](https://github.com/cashapp/hermit) bin directory. | ||
|
||
The symlinks in this directory are managed by Hermit and will automatically | ||
download and install Hermit itself as well as packages. These packages are | ||
local to this environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# This file must be used with "source bin/activate-hermit" from bash or zsh. | ||
# You cannot run it directly | ||
|
||
if [ "${BASH_SOURCE-}" = "$0" ]; then | ||
echo "You must source this script: \$ source $0" >&2 | ||
exit 33 | ||
fi | ||
|
||
BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" | ||
if "${BIN_DIR}/hermit" noop > /dev/null; then | ||
eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")" | ||
|
||
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then | ||
hash -r 2>/dev/null | ||
fi | ||
|
||
echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
if [ -z "${HERMIT_STATE_DIR}" ]; then | ||
case "$(uname -s)" in | ||
Darwin) | ||
export HERMIT_STATE_DIR="${HOME}/Library/Caches/hermit" | ||
;; | ||
Linux) | ||
export HERMIT_STATE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/hermit" | ||
;; | ||
esac | ||
fi | ||
|
||
export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://d1abdrezunyhdp.cloudfront.net/square}" | ||
HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")" | ||
export HERMIT_CHANNEL | ||
export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit} | ||
|
||
if [ ! -x "${HERMIT_EXE}" ]; then | ||
echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2 | ||
curl -fsSL "${HERMIT_DIST_URL}/install.sh" | /bin/bash 1>&2 | ||
fi | ||
|
||
exec "${HERMIT_EXE}" --level=fatal exec "$0" -- "$@" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |