File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ OUTPUT=$1
4
+ DATE=` date`
5
+
6
+ cat << EOF > $OUTPUT
7
+ DATE="$DATE "
8
+ BUILD="$RELEASE_FILE "
9
+ MICROPYTHON_SHA="$MICROPYTHON_VERSION "
10
+ PIMORONI_PICO_SHA="$GITHUB_SHA "
11
+ EOF
Original file line number Diff line number Diff line change @@ -11,10 +11,25 @@ function (copy_module TARGET SRC DST)
11
11
target_sources (${TARGET} INTERFACE ${CMAKE_CURRENT_BINARY_DIR} /../modules/${DST} .py)
12
12
endfunction ()
13
13
14
+ function (genversion TARGET DST)
15
+ add_custom_command (
16
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /../modules/${DST} .py
17
+
18
+ COMMAND
19
+ bash ${CMAKE_CURRENT_LIST_DIR} /genversion.sh ${CMAKE_CURRENT_BINARY_DIR} /../modules/${DST} .py
20
+
21
+ DEPENDS ${CMAKE_CURRENT_LIST_DIR} /genversion.sh
22
+ )
23
+
24
+ target_sources (${TARGET} INTERFACE ${CMAKE_CURRENT_BINARY_DIR} /../modules/${DST} .py)
25
+ endfunction ()
26
+
14
27
# Create a dummy usermod to hang our .py copies from
15
28
add_library (usermod_modules_py INTERFACE )
16
29
target_link_libraries (usermod INTERFACE usermod_modules_py)
17
30
31
+ genversion(usermod_modules_py version )
32
+
18
33
# .py files to copy from modules_py to ports/rp2/modules
19
34
#copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/picosystem.py picosystem)
20
35
copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR} /pimoroni.py pimoroni)
You can’t perform that action at this time.
0 commit comments