File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 4646ros_apt_source_pkg_name=" ros2-apt-source"
4747
4848installed_version=$( dpkg -s ${ros_apt_source_pkg_name} 2> /dev/null | grep -F " Version" | awk ' {print $2}' )
49- newest_version=$( curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F " tag_name" | awk -F\" ' {print $4}' )
49+
50+ CURL_ARGS=(" -H" " Accept: application/vnd.github+json" )
51+ if [[ -n ${GITHUB_TOKEN} ]]
52+ then
53+ CURL_ARGS+=(" -H" " Authorization: Bearer ${GITHUB_TOKEN} " )
54+ fi
55+ newest_version=$( curl " ${CURL_ARGS[@]} " -sL https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | jq -r ' .tag_name' )
56+
57+ if [[ ${newest_version} == " null" ]]
58+ then
59+ tue-install-error " Failed to get the newest version of '${ros_apt_source_pkg_name} '"
60+ fi
61+
5062needs_install=true
5163if [[ -n ${installed_version} ]]
5264then
You can’t perform that action at this time.
0 commit comments