(GH-143) added buildScript setting #436
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to configure the build script to be used for "Code Lens" and "Run Task"
fixes #143
fixes #409
This PR makes configuration of the build script for the "Run Task" command and for "Code Lens" possible.
Currently both are fixed to
./build.sh
for non-Windows andpowershell [...] build.ps1
for Windows.Using this modification it is possible to have different configurations for the build script using a default value and also using platform-dependent values.
The "current" build script as given in the code would translate to the followin setting of
cake.taskRunner.buildScript
:However, if this was to be set in
package.json
, the setting would always contain a value forwin32
. Therefore the default forcake.taskRunner.buildScript
isnull
(or not configured) and the runtime-default (of the above given configuration) is set inExtensionSettings.ts#L72
.One example for an alternate configuration could be:
using the .NET global tool for all paltforms except OSX/macOS in which case the
build.sh
would be used.default
is a "required" property and will always be set (seeExtensionSettings.ts#L83
) while the other properties of thecake.taskRunner.buildScript
object should correspond to one of the values ofos.platform()
.