From dfed614bcfbb68ca17be289241a22efa55c081e6 Mon Sep 17 00:00:00 2001 From: Dmitry Seregin Date: Tue, 8 Oct 2024 20:43:50 +0300 Subject: [PATCH] Update mv3 docs automatically in each branch Merge in ADGUARD-FILTERS/tsurlfilter from feature/update-mv3-docs-automatically-2 to master Squashed commit of the following: commit 1e45e19ecfddb3b64f1ff0d2884e8110237bbc83 Merge: a83b72d34b d3c4df813e Author: Dmitriy Seregin Date: Tue Oct 8 18:10:20 2024 +0300 Merge branch 'master' into feature/update-mv3-docs-automatically-2 commit a83b72d34b33ad88ae5584ded5abcd93997fcf03 Author: Dmitriy Seregin Date: Tue Oct 8 15:44:05 2024 +0300 ignore pnpm cache folder commit f7e7759d29f72c106f240b34a80cf7ccff889dd3 Author: Dmitriy Seregin Date: Tue Oct 8 14:17:08 2024 +0300 fix commit f896438784a0ec068516142805cea6c0a5554ff5 Author: Dmitriy Seregin Date: Tue Oct 8 14:16:30 2024 +0300 Update MV3 docs automatically in each branch --- .gitignore | 3 +++ .../scripts/tsurlfilter-update-docs-mv3.sh | 25 +++++++++++++++++++ bamboo-specs/tsurlfilter-tests.yaml | 9 +++++++ 3 files changed, 37 insertions(+) create mode 100755 bamboo-specs/scripts/tsurlfilter-update-docs-mv3.sh diff --git a/.gitignore b/.gitignore index 178e05c13..b4b7272e8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ node_modules # VS code settings and workspace project .vscode tsurlfilter.code-workspace + +# PNPM cache folder +.pnpm-store diff --git a/bamboo-specs/scripts/tsurlfilter-update-docs-mv3.sh b/bamboo-specs/scripts/tsurlfilter-update-docs-mv3.sh new file mode 100755 index 000000000..6d0a01d2b --- /dev/null +++ b/bamboo-specs/scripts/tsurlfilter-update-docs-mv3.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# 'set' should be added to the beginning of each script to ensure that it runs with the correct options. +# Please do not move it to some common file, like `setup-tests.sh`, because sourcing A script from B script +# cannot change the options of B script. +# -e: Exit immediately if any command exits with a non-zero status (i.e., if a command fails). +# -x: Print each command to the terminal as it is executed, which is useful for debugging. +set -ex + +# Redirect stderr (2) to stdout (1) to capture all output in a single log +exec 2>&1 + +echo "@adguard/tsurlfilter docs mv3 update starting" + +# import helper functions and some common variables +. ./bamboo-specs/scripts/helpers.sh + +# Install dependencies +pnpm install + +# Build with dependencies, lerna is used for builds caching, because +# we specified dependencies with workspace links. +npx lerna run build,docs:mv3 --scope @adguard/tsurlfilter --include-dependencies + +echo "@adguard/tsurlfilter docs mv3 updated" diff --git a/bamboo-specs/tsurlfilter-tests.yaml b/bamboo-specs/tsurlfilter-tests.yaml index 528b18158..12007c8af 100644 --- a/bamboo-specs/tsurlfilter-tests.yaml +++ b/bamboo-specs/tsurlfilter-tests.yaml @@ -60,6 +60,15 @@ Test: interpreter: SHELL scripts: - bamboo-specs/scripts/tswebextension-tests.sh + - script: + interpreter: SHELL + scripts: + - bamboo-specs/scripts/tsurlfilter-update-docs-mv3.sh + - any-task: + plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit + configuration: + commitMessage: 'skipci: Automatic update tsurlfilter MV3 docs' + selectedRepository: defaultRepository artifacts: - name: examples-adguard-api-extension.zip location: packages/examples/adguard-api/build