-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add docker release and local bun #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
MartinFillon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this pr doing all those things, upgrading versions, changing code, adding dockerfile. It is cluttery.
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # Run command with nf if the first argument contains a "-" or is not a system command. The last | ||
| # part inside the "{}" is a workaround for the following bug in ash/dash: | ||
| # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
| if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
| set -- nf "$@" | ||
| fi | ||
|
|
||
| exec "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this useful ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To override the node docker entrypoint
| #!/bin/sh | ||
| basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
|
|
||
| case `uname` in | ||
| *CYGWIN*|*MINGW*|*MSYS*) | ||
| if command -v cygpath > /dev/null 2>&1; then | ||
| basedir=`cygpath -w "$basedir"` | ||
| fi | ||
| ;; | ||
| esac | ||
|
|
||
| if [ -z "$NODE_PATH" ]; then | ||
| export NODE_PATH="/usr/nanoforge/node_modules" | ||
| else | ||
| export NODE_PATH="/usr/nanoforge/node_modules:$NODE_PATH" | ||
| fi | ||
| if [ -x "$basedir/node" ]; then | ||
| exec "$basedir/node" "$basedir/cli/dist/nf.js" "$@" | ||
| else | ||
| exec node "$basedir/cli/dist/nf.js" "$@" | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant we just use a release version of nanoforge instead of that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by that ?
What does this PR do?
Resolves #13
Resolves #48
How do you test this PR?