-
Notifications
You must be signed in to change notification settings - Fork 10.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
Add new build.cmd/sh options for suppressing restore, NodeJS, setting target arch and OS name, and more #7137
Conversation
… target arch and OS name, and more Add new command line parameters for working with the project: * `-NoBuild`, `-NoRestore` - these already existed, but users found it hard to discover this powershell syntax: '-build:$false' *` -Arch`/`--arch` - set the target CPU architecture to build. Defaults to x64 * `--os-name` - on non-Windows builds, manually specify if the build should target Alpine. generic Linux, or MacOS * Rename flags used to build specific project types. The pattern now is `--build-$(group)` or `--no-build-$(group)` (In PowerShell its `-Build$(Group)` or `-NoBuild$(Group). Example: -NoBuildJava Changes to build definitions: * Update the ci build definition to build all supported architectures * Support publishing multiple artifacts per job Other changes: * -NoBuild implies -NoRestore * Add new properties, `TargetArchitecture`, `TargetOsName`, and `TargetRuntimeIdentifier` * Replace usages of `SharedFxRid` with these new properties * To make `--no-build-nodejs` actually work, replaced Components.Browser.JS.csproj with Components.Browser.JS.npmproj * Fix errors when building for win-arm on a clean machine * Fix a few other project errors, like using the wrong syntax for DefaultItemExcludes, or using the wrong Platform value for x86
[switch]$NoBuildNative, | ||
[switch]$NoBuildNodeJS, | ||
[switch]$NoBuildJava, | ||
[switch]$NoBuildInstallers, |
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.
Could we make the true and false cases mutually exclusive e.g. put $BuildManaged
and $NoBuildManaged
in a parameter group?
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 considered that, but then you wouldn't be able to mix a "yes" with a "no" flag, like -BuildManaged -NoBuildJava
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 was thinking about smaller parameter groups e.g. one containing just $BuildManaged
and $NoBuildManaged
. But, this wasn't a show-stopper -- more a potential usability enhancement.
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'd like to make it more usable too, but I don't see a good way to do that without specifying a lengthy list of valid combinations.. If there is a better way to tell powershell about mutually exclusive parameters, I'm all for it.
All PR checks are passing now. |
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.
Minor requests but overall looks great
src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
Show resolved
Hide resolved
Thanks @dougbu. Updated with a few minor tweaks. I'll merge once the PR check is green again. |
This almost completes work to convert this repo to build in Azure Pipelines. We're still blocked on either installing .NET 3.5 https://github.com/dotnet/core-eng/issues/5119 or getting a newer version of Wix (wixtoolset/issues#5523)
Add new command line parameters for working with the project:
-NoBuild
,-NoRestore
- these already existed, but users found it hard to discover this powershell syntax: '-build:$false'-Arch
/--arch
- set the target CPU architecture to build. Defaults to x64--os-name
- on non-Windows builds, manually specify if the build should target Alpine. generic Linux, or MacOS--build-$(group)
or--no-build-$(group)
(In PowerShell its-Build$(Group)
or `-NoBuild$(Group). Example: -NoBuildJavaChanges to build definitions:
Other changes:
-NoBuild
implies-NoRestore
TargetArchitecture
,TargetOsName
, andTargetRuntimeIdentifier
SharedFxRid
with these new properties--no-build-nodejs
actually work, replaced Components.Browser.JS.csproj with Components.Browser.JS.npmproj