-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Pass through $PATH to find dotnet #685
Pass through $PATH to find dotnet #685
Conversation
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.
Hello 👋!
Thanks for the contribution. I'm in favour of making it easier to build GCM on more platforms, but I have one concern about this change as it stands.
The $DOTNET_ROOT
variable is set by the dotnet
app host executable, which is typically the caller of these scripts (via MSBuild). However in the cases that this script is called directly (not via dotnet
) then the variable is not set, and the commands being run in this script will be /dotnet publish ...
which will not resolve correctly.
If we are to accept this then there should be a check that if the $DOTNET_ROOT
variable is not set, then the script should fall back to invoking dotnet
and let the shell resolve the executable location..
..OR add something like this to explicitly resolve:
if [ -z "$DOTNET_ROOT" ]; then
DOTNET_ROOT="$(dirname $(which dotnet))"
fi
Hi @mjcheetham, that's a great call out, thanks for the feedback! I'll fix this up, would you rather have a fixup commit (commit --fixup), a new commit, or an amendment to the existing commit (commit --amend)? |
@easwarh - I know you directed your question at Matthew, but FWIW my usual workflow in GCM is to amend my existing commits. |
Thanks for the headsup. I'll push a merged commit. |
Signed-off-by: Easwar Hariharan <[email protected]>
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.
Looks good to me!
# Publish core application executables | ||
echo "Publishing core application..." | ||
dotnet publish "$GCM_SRC" \ | ||
$DOTNET_ROOT/dotnet publish "$GCM_SRC" \ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This commit makes it easier to build on Linux from source. Related to #606, but
applies to x64 builds as well.
Signed-off-by: Easwar Hariharan [email protected]