Update to-integrations-repo script to new link style
@@ -36,6 +36,10 @@ strip_toc() {
sed -Ee '/^ - \[.*\](.*)$/d'
}
+convert_link_target() {
+ perl -00p -e 's/\[(.+?)\]\((http.+?)\)/<a target="_blank" href="\2">\1<\/a>/gsm'
+}
+
write_doc() {
printf "# ![](https://github.com/signalfx/integrations/blob/master/signalfx-agent/img/integration_smartagent.png) SignalFx Smart Agent\n\n"
printf "<!-- Generated by scripts/docs/to-integrations-repo in signalfx-agent repo. DO NOT EDIT in the integrations repo!! -->\n\n"
@@ -43,7 +47,7 @@ write_doc() {
cat <<EOH
### DESCRIPTION
-See [the Github repo](https://github.com/signalfx/signalfx-agent) for the
+See <a target="_blank" href="https://github.com/signalfx/signalfx-agent">the Github repo</a> for the
source code along with more extensive documentation.
EOH
@@ -56,7 +60,8 @@ EOH
sed -e '/## Concepts/d' | \
uppercase_l2_headers | \
increase_all_header_level | \
- convert_relative_links
+ convert_relative_links | \
+ convert_link_target
}
write_doc | tee $INTEGRATIONS_REPO_PATH/signalfx-agent/README.md
