forked from moveit/moveit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
116 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ LABEL maintainer Robert Haschke [email protected] | |
# Switch to ros-testing | ||
RUN echo "deb http://packages.ros.org/ros2-testing/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2-latest.list | ||
|
||
# Upgrade packages to ros-shadow-fixed and clean apt-cache within one RUN command | ||
# Upgrade packages to ros-testing and clean apt-cache within one RUN command | ||
RUN apt-get -qq update && \ | ||
apt-get -qq upgrade && \ | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# Generate and install version.h | ||
|
||
if(NOT "$ENV{USER}" STREQUAL "buildfarm") # Don't define version postfix on buildfarm | ||
set(MOVEIT_VERSION_EXTRA "devel" CACHE STRING "version string postfix") | ||
endif() | ||
|
||
message(STATUS " *** Building MoveIt ${moveit_core_VERSION} ${MOVEIT_VERSION_EXTRA} ***") | ||
|
||
# https://stackoverflow.com/questions/13920072/how-to-always-run-command-when-building-regardless-of-any-dependency | ||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/include/moveit/version.h always_rebuild | ||
COMMAND ${CMAKE_COMMAND} | ||
-DVERSION_FILE_PATH="${CMAKE_BINARY_DIR}/include" | ||
-DMOVEIT_VERSION="${moveit_core_VERSION}" | ||
-DMOVEIT_VERSION_EXTRA="${MOVEIT_VERSION_EXTRA}" | ||
-P ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
add_custom_target(version_h | ||
DEPENDS always_rebuild | ||
COMMENT "Generating version.h" | ||
) | ||
|
||
add_executable(moveit_version version.cpp) | ||
target_include_directories(moveit_version PRIVATE ${CMAKE_BINARY_DIR}/include) | ||
add_dependencies(moveit_version version_h) | ||
|
||
target_include_directories(moveit_version PRIVATE ${CMAKE_BINARY_DIR}/include/moveit_core) | ||
|
||
install(FILES "${CMAKE_BINARY_DIR}/include/moveit_core/moveit/version.h" DESTINATION include/moveit_core/moveit) | ||
install(TARGETS moveit_version RUNTIME DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Retrieve (active) branch name | ||
execute_process( | ||
COMMAND git rev-parse --abbrev-ref HEAD | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
OUTPUT_VARIABLE MOVEIT_GIT_NAME | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_QUIET | ||
) | ||
|
||
if("${MOVEIT_GIT_NAME}" STREQUAL "HEAD") | ||
# Retrieve any associated name (tag or branch) | ||
execute_process( | ||
COMMAND git describe --contains --all HEAD | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
OUTPUT_VARIABLE MOVEIT_GIT_NAME | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_QUIET | ||
) | ||
endif() | ||
|
||
# Retrieve (short) commit hash | ||
execute_process( | ||
COMMAND git rev-parse --short HEAD | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
OUTPUT_VARIABLE MOVEIT_GIT_COMMIT_HASH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_QUIET | ||
) | ||
|
||
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" MOVEIT_VERSION_MAJOR "${moveit_core_VERSION}") | ||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" MOVEIT_VERSION_MINOR "${moveit_core_VERSION}") | ||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" MOVEIT_VERSION_PATCH "${moveit_core_VERSION}") | ||
set(MOVEIT_VERSION "${MOVEIT_VERSION_MAJOR}.${MOVEIT_VERSION_MINOR}.${MOVEIT_VERSION_PATCH}") | ||
|
||
if(NOT "${MOVEIT_VERSION_EXTRA}" STREQUAL "") | ||
string(APPEND MOVEIT_VERSION "-${MOVEIT_VERSION_EXTRA}") | ||
endif() | ||
|
||
configure_file("version.h.in" "${VERSION_FILE_PATH}/moveit_core/moveit/version.h") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters