-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathgen_pack.sh
More file actions
executable file
·149 lines (129 loc) · 3.4 KB
/
gen_pack.sh
File metadata and controls
executable file
·149 lines (129 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/usr/bin/env bash
# Version: 3.1
# Date: 2024-04-17
# This bash script generates a CMSIS Software Pack: CMSIS-Driver_Validation
#
set -o pipefail
# Set version of gen pack library
# For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
# Use the tag name without the prefix "v", e.g., 0.7.0
REQUIRED_GEN_PACK_LIB="0.11.3"
# Set default command line arguments
DEFAULT_ARGS=(-c "")
# Pack warehouse directory - destination
# Default: ./output
#
# PACK_OUTPUT=./output
# Temporary pack build directory
# Default: ./build
#
# PACK_BUILD=./build
# Specify directory names to be added to pack base directory
# An empty list defaults to all folders next to this script.
# Default: empty (all folders)
#
PACK_DIRS="
Config
Documentation
Examples
Include
Source
Template
Tools
"
# Specify file names to be added to pack base directory
# Default: empty
#
PACK_BASE_FILES="
LICENSE.txt
README.md
"
# Specify file names to be deleted from pack build directory
# Default: empty
#
PACK_DELETE_FILES="
Documentation/Doxygen
"
# Specify patches to be applied
# Default: empty
#
# PACK_PATCH_FILES="
# <list patches here>
# "
# Specify addition argument to packchk
# Default: empty
#
# PACKCHK_ARGS=()
# Specify additional dependencies for packchk
# Default: empty
#
PACKCHK_DEPS="
ARM.CMSIS.pdsc
ARM.CMSIS-Compiler.pdsc
ARM.CMSIS-Driver_STM32.pdsc
ARM.CMSIS-RTX.pdsc
Keil.STM32H5xx_DFP.pdsc
Keil.STM32F4xx_DFP.pdsc
Keil.STM32U5xx_DFP.pdsc
Keil.NUCLEO-H563ZI_BSP.pdsc
Keil.STM32F429I-DISC1_BSP.pdsc
Keil.B-U585I-IOT02A_BSP.pdsc
"
# Optional: restrict fallback modes for changelog generation
# Default: full
# Values:
# - full Tag annotations, release descriptions, or commit messages (in order)
# - release Tag annotations, or release descriptions (in order)
# - tag Tag annotations only
#
PACK_CHANGELOG_MODE="tag"
# Specify file patterns to be excluded from the checksum file
# Default: <empty>
# Values:
# - empty All files packaged are included in the checksum file
# - glob pattern One glob pattern per line. Files matching a given pattern are excluded
# from the checksum file
# - "*" The * (match all pattern) can be used to skip checksum file creating completely.
#
# PACK_CHECKSUM_EXCLUDE="
# <list file patterns here>
# "
#
# custom pre-processing steps
#
# usage: preprocess <build>
# <build> The build folder
#
function preprocess() {
# add custom steps here to be executed
# before populating the pack build folder
pushd ./Documentation/Doxygen/ > /dev/null
echo "Changing working directory to $(pwd)"
echo "Executing ./gen_doc.sh"
./gen_doc.sh
popd > /dev/null
echo "Changing working directory to $(pwd)"
return 0
}
#
# custom post-processing steps
#
# usage: postprocess <build>
# <build> The build folder
#
function postprocess() {
# add custom steps here to be executed
# after populating the pack build folder
# but before archiving the pack into output folder
return 0
}
############ DO NOT EDIT BELOW ###########
# Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
# ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
if [[ -n "${GEN_PACK_LIB_PATH}" ]] && [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
. "${GEN_PACK_LIB_PATH}/gen-pack"
else
. <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
fi
gen_pack "${DEFAULT_ARGS[@]}" "$@"
exit 0