Skip to content

Add PreNewBcCompilerFolder and PostNewBcCompilerFolder hooks#2262

Open
mazhelez wants to merge 6 commits into
mainfrom
mazhelez/CompileApps-NewBcCompilerFolder
Open

Add PreNewBcCompilerFolder and PostNewBcCompilerFolder hooks#2262
mazhelez wants to merge 6 commits into
mainfrom
mazhelez/CompileApps-NewBcCompilerFolder

Conversation

@mazhelez
Copy link
Copy Markdown
Collaborator

@mazhelez mazhelez commented May 26, 2026

Description

Adds two new hooks for customizing the compiler folder creation process when workspace compilation is enabled:

  • PreNewBcCompilerFolder.ps1 - Runs before New-BcCompilerFolder is called. Receives a [hashtable] $parameters argument containing the parameters that will be passed to New-BcCompilerFolder. The script can modify the hashtable in-place to customize the compiler folder creation (e.g., add a platformArtifactUrl to use a specific platform version).

  • PostNewBcCompilerFolder.ps1 - Runs after the compiler folder is created. Receives [hashtable] $parameters and [string] $compilerFolder arguments.

Place these scripts in your project's .AL-Go folder to use them.

Changes

  • Updated Compile.ps1 to load and invoke PreNewBcCompilerFolder/PostNewBcCompilerFolder scripts via Get-ScriptOverrides
  • Added documentation in Scenarios/settings.md for both hooks
  • Added release notes in RELEASENOTES.md

Note

These hooks are only called when workspace compilation is enabled.

Copilot AI review requested due to automatic review settings May 26, 2026 13:33
@mazhelez mazhelez requested a review from a team as a code owner May 26, 2026 13:33
@mazhelez
Copy link
Copy Markdown
Collaborator Author

@copilot please add release notes

@mazhelez mazhelez marked this pull request as draft May 26, 2026 13:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-Go folder.

Comment thread Actions/CompileApps/Compile.ps1
Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

@copilot please add release notes

Added release notes in commit c7d29e7. The entry describes how to place a NewBcCompilerFolder.ps1 script in the project's .AL-Go folder to customize compiler folder creation, along with the fallback behavior.

@mazhelez mazhelez changed the title Add NewBcCompilerFolder to script overrides Add PreNewBcCompilerFolder and PostNewBcCompilerFolder hooks May 26, 2026
mazhelez added 3 commits May 26, 2026 17:21
- 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
@mazhelez mazhelez marked this pull request as ready for review May 26, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants