Skip to content

Commit

Permalink
[8.12] fix(NA): skip plugin-helpers assets optimization when no ui (#…
Browse files Browse the repository at this point in the history
…173703) (#173753)

# Backport

This will backport the following commits from `main` to `8.12`:
- [fix(NA): skip plugin-helpers assets optimization when no ui
(#173703)](#173703)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago
Costa","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-20T14:44:33Z","message":"fix(NA):
skip plugin-helpers assets optimization when no ui (#173703)\n\nThis
fixes a bug where the asset optimization script will try to run\r\neven
when we don't have any ui plugin
generated.","sha":"891d79b9e7bbdab31a7f0df8f8ccd10f87fcf1c2","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","auto-backport","v8.10.5","v8.12.1","v8.13.0","v8.11.4"],"number":173703,"url":"https://github.com/elastic/kibana/pull/173703","mergeCommit":{"message":"fix(NA):
skip plugin-helpers assets optimization when no ui (#173703)\n\nThis
fixes a bug where the asset optimization script will try to run\r\neven
when we don't have any ui plugin
generated.","sha":"891d79b9e7bbdab31a7f0df8f8ccd10f87fcf1c2"}},"sourceBranch":"main","suggestedTargetBranches":["8.10","8.12","8.11"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.5","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173703","number":173703,"mergeCommit":{"message":"fix(NA):
skip plugin-helpers assets optimization when no ui (#173703)\n\nThis
fixes a bug where the asset optimization script will try to run\r\neven
when we don't have any ui plugin
generated.","sha":"891d79b9e7bbdab31a7f0df8f8ccd10f87fcf1c2"}},{"branch":"8.11","label":"v8.11.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tiago Costa <[email protected]>
  • Loading branch information
kibanamachine and mistic authored Dec 20, 2023
1 parent ced76be commit c6dc1b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ import { TaskContext } from '../task_context';

const asyncPipeline = promisify(pipeline);

export async function brotliCompressBundles({ buildDir, log }: TaskContext) {
export async function brotliCompressBundles({ buildDir, log, plugin }: TaskContext) {
if (!plugin.manifest.ui) {
return;
}

const compressDir = Path.resolve(buildDir, 'target/public');

log.info(
Expand Down

0 comments on commit c6dc1b8

Please sign in to comment.