Poor man's templating for PRST_ZB_BUILD_DATE=__TODAY__ in GitHub actions
This commit is contained in:
parent
3d68e5c689
commit
c5a129a39a
2 changed files with 8 additions and 0 deletions
7
.github/actions/build/build.sh
vendored
7
.github/actions/build/build.sh
vendored
|
|
@ -7,8 +7,15 @@ REVISION=$3
|
|||
CMAKE_EXTRA=$4
|
||||
OUTPUT_BIN=$5
|
||||
|
||||
TODAY=$(date +'%Y-%m-%d')
|
||||
|
||||
# Replaces occurrences of "__TODAY__" with $TODAY in $CMAKE_EXTRA.
|
||||
CMAKE_EXTRA="${CMAKE_EXTRA/__TODAY__/"$TODAY"}"
|
||||
|
||||
cd "${GITHUB_WORKSPACE}/${SAMPLE_DIR}"
|
||||
|
||||
echo $CMAKE_EXTRA
|
||||
|
||||
west build --build-dir ./build --pristine --board "${BOARD}@${REVISION}" -- $CMAKE_EXTRA
|
||||
|
||||
mv build/zephyr/zephyr.hex build/zephyr/"${OUTPUT_BIN}"
|
||||
1
.github/workflows/b-parasite.yml
vendored
1
.github/workflows/b-parasite.yml
vendored
|
|
@ -79,3 +79,4 @@ jobs:
|
|||
sample-dir: code/nrf-connect/samples/zigbee
|
||||
board: bparasite_nrf52840
|
||||
output-bin: zigbee_nrf52840_default.hex
|
||||
cmake-extra: -DPRST_ZB_BUILD_DATE=__TODAY__
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue