Skip to content

Commit

Permalink
[scripts] Hide readmes from the site if the component has no path. (#…
Browse files Browse the repository at this point in the history
…3637)

This allows a component to exist in the repo but not in the website. This is helpful in the case of components that should be private but aren't.
  • Loading branch information
jverkoey committed May 2, 2018
1 parent 2979d14 commit ed19233
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/generate_readme
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ TMP_EXPANDED_README_PATH="$TMP_PATH/README.md.expanded"
TMP_TOC_PATH="$TMP_PATH/toc.md"
TOC_STRING="<!-- toc -->"

./scripts/apply_template "$COMPONENT" scripts/templates/component/README.md.template "$TMP_README_PATH"
touch "$TMP_README_PATH"

if [[ $(grep -e "^root_path" "$COMPONENT_PATH/.vars") ]]; then
./scripts/apply_template "$COMPONENT" scripts/templates/component/README.md.template "$TMP_README_PATH"
fi

echo "<!-- This file was auto-generated using $0 $COMPONENT -->" >> "$TMP_README_PATH"
echo "" >> "$TMP_README_PATH"
Expand Down

0 comments on commit ed19233

Please sign in to comment.