Skip to content

Commit c0b7c26

Browse files
committed
ci: prepare_artifacts: Fix DTBs upload
Update timestamp format to match the previous format. Fix pattern matching to upload DTBs to the correct location. Signed-off-by: bia1708 <[email protected]>
1 parent 5f8d735 commit c0b7c26

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ci/travis/prepare_artifacts.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
#!/bin/bash -e
33

4-
TIMESTAMP=$(date +%Y_%m_%d-%H_%M)
4+
TIMESTAMP=$(date +%Y_%m_%d-%H_%M_%S)
55
# For PRs, Azure makes a merge commit (HEAD) because of the shallow copy option
66
# (which we want). So, GIT_SHA in this case is the actual correct commit inside
77
# the PR, and MERGE_COMMIT is the commit made by Azure (which we extract the date
@@ -88,17 +88,17 @@ artifacts_structure() {
8888
echo "IMAGE: ${image_to_copy[${platform}]}!"
8989
cp ${image_to_copy[${platform}]} ${image_location}
9090
fi
91-
done
9291

93-
if [ "${arch}" == "microblaze" ]; then
94-
dtbs_to_copy=$(ls -d -1 Microblaze/*)
95-
else
96-
dtbs_to_copy=$(ls -d -1 DTBs/* | grep "${platform}")
97-
fi
92+
if [ "${arch}" == "microblaze" ]; then
93+
dtbs_to_copy=$(ls -d -1 Microblaze/*)
94+
else
95+
dtbs_to_copy=$(ls -d -1 DTBs/* | grep "${platform}[-|_]")
96+
fi
9897

99-
# Copy DTBs to the correct location
100-
for dtb in ${dtbs_to_copy}; do
101-
cp ${dtb} "${TIMESTAMP}/${arch}"
98+
# Copy DTBs to the correct location
99+
for dtb in ${dtbs_to_copy}; do
100+
cp ${dtb} "${TIMESTAMP}/${arch}"
101+
done
102102
done
103103
done
104104
}

0 commit comments

Comments
 (0)