Skip to content

Commit 2733c40

Browse files
committed
scripts: tag_west_repos: make tags optional
In some cases, e.g. fix releases, not all repositories need tagging. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 2f6f296 commit 2733c40

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

scripts/tag_west_repos.sh

+8-11
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,14 @@ remove_tag() {
159159
git -C "$local_path" tag -d "$tagname"
160160
}
161161

162-
check_tags() {
163-
164-
for project in "${!PROJECT_TAGS[@]}"; do
165-
if [ -z "${PROJECT_TAGS[$project]}" ]; then
166-
echo "error: empty tag name" 1>&2
167-
exit 1
168-
fi
169-
done
170-
}
171-
172162
tag_all() {
173163
# Creates all the tags in the PROJECT_TAGS array.
174164

175165
for project in "${!PROJECT_TAGS[@]}"; do
166+
if [ -z "${PROJECT_TAGS[$project]}" ]; then
167+
echo "Skipping $project (not tagged)"
168+
continue
169+
fi
176170
tag "$project" "${PROJECT_TAGS[$project]}"
177171
done
178172
}
@@ -182,6 +176,10 @@ push_all() {
182176
# to the main nrfconnect repositories on GitHub.
183177

184178
for project in "${!PROJECT_TAGS[@]}"; do
179+
if [ -z "${PROJECT_TAGS[$project]}" ]; then
180+
echo "Skipping $project (not tagged)"
181+
continue
182+
fi
185183
push_tag "$project" "${PROJECT_TAGS[$project]}"
186184
done
187185
}
@@ -197,7 +195,6 @@ remove_all() {
197195
command="$1"
198196
shift
199197

200-
check_tags
201198
case "$command" in
202199
tag-all)
203200
# Create tags in all the repositories in the local working trees.

0 commit comments

Comments
 (0)