Commit efe7030
committed
firmware-update-pacakge: Enhance min_version calculation
Improves the logic for calculating the `min_version` in the firmware
update package generation script.
The new implementation correctly handles various version formats,
including those with multi-digit numbers and zero-padding (e.g.,
`V01.06.12`, `1.6.6`). It replaces any numeric part of the version
string greater than 1 with a 1, while preserving the original padding
and any non-numeric prefixes.
This change makes the version handling more robust and adaptable to
different versioning schemes.
Additionally, the script has been updated to follow shellcheck best
practices, including quoting variables and adding safety checks for
directory changes.
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>1 parent 608da96 commit efe7030
File tree
1 file changed
+60
-17
lines changed- meta-example/recipes-devtools/firmware-update-package/files
1 file changed
+60
-17
lines changedLines changed: 60 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
12 | 28 | | |
13 | 29 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 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 | + | |
18 | 61 | | |
19 | 62 | | |
20 | 63 | | |
21 | 64 | | |
22 | 65 | | |
23 | 66 | | |
24 | | - | |
25 | | - | |
| 67 | + | |
| 68 | + | |
26 | 69 | | |
27 | 70 | | |
28 | 71 | | |
29 | 72 | | |
30 | | - | |
| 73 | + | |
31 | 74 | | |
32 | 75 | | |
33 | 76 | | |
34 | 77 | | |
35 | | - | |
| 78 | + | |
36 | 79 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
41 | 84 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
45 | 88 | | |
46 | 89 | | |
47 | | - | |
| 90 | + | |
0 commit comments