Skip to content

Commit 2fd1807

Browse files
committed
add version to the binary during build
1 parent 0b5af34 commit 2fd1807

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ jobs:
5555
uses: actions/checkout@v3
5656
with:
5757
path: ${{ env.IMGTOOL_PACKING_PATH }}
58+
59+
- name: Set the version
60+
working-directory: ${{ env.IMGTOOL_PACKING_PATH }}/patches/
61+
run: sed -i 's/ARDUINO_VERSION_PLACEHOLDER/${GITHUB_REF/refs\/tags\//}/' 0008-Imgtool-Append-arduino-to-version-string.patch
5862

5963
- name: Apply patches
6064
working-directory: ${{ env.MCUBOOT_PATH }}/scripts/
@@ -134,6 +138,10 @@ jobs:
134138
with:
135139
path: ${{ env.IMGTOOL_PACKING_PATH }}
136140

141+
- name: Set the version
142+
working-directory: ${{ env.IMGTOOL_PACKING_PATH }}/patches/
143+
run: sed -i 's/ARDUINO_VERSION_PLACEHOLDER/${GITHUB_REF/refs\/tags\//}/' 0008-Imgtool-Append-arduino-to-version-string.patch
144+
137145
- name: Apply patches
138146
working-directory: ${{ env.MCUBOOT_PATH }}/scripts/
139147
run: git apply -v "${{ env.IMGTOOL_PACKING_PATH }}/patches/"*

patches/0008-Imgtool-Append-arduino-to-version-string.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ index ca43b8d..20769a4 100644
1616
# limitations under the License.
1717

1818
-imgtool_version = "1.8.0"
19-
+imgtool_version = "1.8.0-arduino"
19+
+imgtool_version = "ARDUINO_VERSION_PLACEHOLDER"
2020
--
2121
2.30.2
2222

0 commit comments

Comments
 (0)