Skip to content

Commit

Permalink
chore(ci): update skip pattern
Browse files Browse the repository at this point in the history
to ignore files added due to submodule usage for
HAL drivers and CMSIS device headers.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Nov 24, 2023
1 parent b7c9e55 commit a46472a
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions CI/update/stm32cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@
md_CMSIS_path = "STM32YYxx_CMSIS_version.md"
md_HAL_path = "STM32YYxx_HAL_Driver_version.md"

# Pattern list of files to skip
hal_skip_pattern = {"*.chm"}
cmsis_skip_pattern = {"iar", "arm"}
common_skip_pattern = {
".github",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"SECURITY.md",
}

# stm32 def file to update
stm32_def = "stm32_def.h"

Expand Down Expand Up @@ -845,7 +855,11 @@ def updateCore():
HAL_serie_cube_path = (
cube_path / hal_src_path / f"STM32{serie}xx_HAL_Driver"
)
copyFolder(HAL_serie_cube_path, HAL_serie_core_path, {"*.chm"})
copyFolder(
HAL_serie_cube_path,
HAL_serie_core_path,
hal_skip_pattern.union(common_skip_pattern),
)
# Update MD file
updateMDFile(md_HAL_path, serie, cube_HAL_ver)
# Commit all HAL files
Expand All @@ -863,7 +877,11 @@ def updateCore():
deleteFolder(CMSIS_serie_dest_path)
# Copy new one
CMSIS_serie_cube_path = cube_path / cmsis_src_path / f"STM32{serie}xx"
copyFolder(CMSIS_serie_cube_path, CMSIS_serie_dest_path, {"iar", "arm"})
copyFolder(
CMSIS_serie_cube_path,
CMSIS_serie_dest_path,
cmsis_skip_pattern.union(common_skip_pattern),
)
# Update MD file
updateMDFile(md_CMSIS_path, serie, cube_CMSIS_ver)
# Commit all CMSIS files
Expand Down

0 comments on commit a46472a

Please sign in to comment.