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 2323ros_apt_source_pkg_name=" ros-apt-source"
2424
2525installed_version=$( dpkg -s ${ros_apt_source_pkg_name} 2> /dev/null | grep -F " Version" | awk ' {print $2}' )
26- newest_version=$( curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F " tag_name" | awk -F\" ' {print $4}' )
26+
27+ CURL_ARGS=(" -H" " Accept: application/vnd.github+json" )
28+ if [[ -n ${GITHUB_TOKEN} ]]
29+ then
30+ CURL_ARGS+=(" -H" " Authorization: Bearer ${GITHUB_TOKEN} " )
31+ fi
32+ newest_version=$( curl " ${CURL_ARGS[@]} " -sL https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | jq -r ' .tag_name' )
33+
34+ if [[ ${newest_version} == " null" ]]
35+ then
36+ tue-install-error " Failed to get the newest version of '${ros_apt_source_pkg_name} '"
37+ fi
38+
2739needs_install=true
2840if [[ -n ${installed_version} ]]
2941then
You can’t perform that action at this time.
0 commit comments