-
Notifications
You must be signed in to change notification settings - Fork 56
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
Allow users to supply a custom SDK and source-built artifacts #100
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
build.sh
Outdated
cp -a "${CUSTOM_SDK_DIR}" $__scriptpath/.dotnet | ||
sdk_version="$(basename "$(find "${CUSTOM_SDK_DIR}/sdk" -maxdepth 1 -type d -printf "%p\n" | sort -rn | head -1)")" | ||
echo "Found SDK version $sdk_version in ${CUSTOM_SDK_DIR}" | ||
jq ".tools.dotnet = \"$sdk_version\"" global.json > global.json.tmp && mv global.json.tmp global.json |
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.
I don't think the CI images that we use have jq installed on them. Can you use sed here?
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.
I will give it a shot. But it wont be as reliable or robust as parsing json using something that understands json. Is a scripting language like perl
or python
available in the CI images?
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.
Arcade uses grep
: https://github.com/dotnet/arcade/blob/3dec733f38264d7068ae75b3bb85e4c43979bcc7/eng/common/tools.sh#L76-L90
There's some discussion about changing to something else that actually understands json at dotnet/arcade#2510, but in core infra that we want to work when bringing up new platforms, depending on stuff we may not need to is a very hard sell.
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.
Thanks @omajid. Once this is in, I will use it to remove the checked in binaries in the source-built directory and download the source-built-packages instead.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This change tries to implement something analogous to dotnet/source-build#1455 for source-build-reference-packages. With this change, I can build source-build-reference-packages completely offline on linux-x64 against a source-built SDK by running: ./build.sh --with-sdk /usr/lib64/dotnet \ --with-packages /usr/lib64/dotnet/source-built-artifacts/*.tar.gz
14ce71b
to
93e4ef4
Compare
@omajid ready to merge? |
@dseefeld Yes, looks good on my end. |
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.
A couple general sh review notes, sorry I missed the merge though.
This change tries to implement something analogous to dotnet/source-build#1455 for source-build-reference-packages.
With this change, I can build source-build-reference-packages completely offline on linux-x64 against a source-built SDK by running:
This adds a dependency on thejq
tool for editing json.