Add PreNewBcCompilerFolder and PostNewBcCompilerFolder hooks#2262
Open
mazhelez wants to merge 6 commits into
Open
Add PreNewBcCompilerFolder and PostNewBcCompilerFolder hooks#2262mazhelez wants to merge 6 commits into
mazhelez wants to merge 6 commits into
Conversation
Collaborator
Author
|
@copilot please add release notes |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to extend the Actions/CompileApps/Compile.ps1 script override mechanism so repositories can override how the compiler folder is created (via a NewBcCompilerFolder.ps1 override), enabling more customization during compilation.
Changes:
- Adds
"NewBcCompilerFolder"to the list of override script names collected from the project’s.AL-Gofolder.
Agent-Logs-Url: https://github.com/microsoft/AL-Go/sessions/c44f8f85-b313-42f0-b511-eda29f301305 Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Contributor
- Add Pre/Post hooks for New-BcCompilerFolder in Compile.ps1 - Document hooks in Scenarios/settings.md - Add release notes in RELEASENOTES.md - Note: hooks only called when workspace compilation is enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds two new hooks for customizing the compiler folder creation process when workspace compilation is enabled:
PreNewBcCompilerFolder.ps1 - Runs before
New-BcCompilerFolderis called. Receives a[hashtable] $parametersargument containing the parameters that will be passed toNew-BcCompilerFolder. The script can modify the hashtable in-place to customize the compiler folder creation (e.g., add aplatformArtifactUrlto use a specific platform version).PostNewBcCompilerFolder.ps1 - Runs after the compiler folder is created. Receives
[hashtable] $parametersand[string] $compilerFolderarguments.Place these scripts in your project's
.AL-Gofolder to use them.Changes
Compile.ps1to load and invoke PreNewBcCompilerFolder/PostNewBcCompilerFolder scripts viaGet-ScriptOverridesScenarios/settings.mdfor both hooksRELEASENOTES.mdNote
These hooks are only called when workspace compilation is enabled.