File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 version__name__=${armhf__filename__#*-}
3434 name__=$(echo ${armhf__filename__%-*} | tr -d '\n')
3535 trailing_=$(git rev-list --count HEAD | tr -d '\n')
36- version__=$(echo ${version__name__%-*} | tr -d '\n' )
36+ version__=$(cat ../VERSION )
3737 echo "name__=$name__" >> $GITHUB_ENV
3838 echo "version__=$version__" >> $GITHUB_ENV
3939 echo "armhf__filename__=$armhf__filename__" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ project(beaglecfg VERSION 0.1)
33
44option (BEAGLE_CONFIG_SANITIZE "Use sanitize debug options" OFF )
55option (ARMHF_DEB "Debian Package for armhf" OFF )
6+ option (VERSION_FILE "Create a version file" OFF )
67
78include (FetchContent )
89set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE )
@@ -88,6 +89,13 @@ configure_file(
8889 ${CMAKE_CURRENT_BINARY_DIR} /src/environment.hpp
8990)
9091
92+ if (VERSION_FILE)
93+ execute_process (
94+ COMMAND bash -c "echo -n ${CMAKE_PROJECT_VERSION} -${git_version} > VERSION"
95+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
96+ )
97+ endif ()
98+
9199if (ARMHF_DEB)
92100
93101 set (ARCHITECTURE "armhf" )
Original file line number Diff line number Diff line change 1+ 0.1-64
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ check_and_install "gcc-8-arm-linux-gnueabihf" "g++-8-arm-linux-gnueabihf" "cmake
1717mkdir -p build
1818cd build
1919cmake .. -DCMAKE_CXX_COMPILER=$( which arm-linux-gnueabihf-g++-8) \
20- -DCMAKE_C_COMPILER=$( which arm-linux-gnueabihf-gcc-8)
20+ -DCMAKE_C_COMPILER=$( which arm-linux-gnueabihf-gcc-8) \
21+ -DVERSION_FILE=ON
2122make -j$( nproc)
You can’t perform that action at this time.
0 commit comments