Browse Source

Fix "generate-repo-stub-readme.sh" for elastic/* repos

Tianon Gravi 7 years ago
parent
commit
60bb1d234b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      generate-repo-stub-readme.sh

+ 5 - 0
generate-repo-stub-readme.sh

@@ -26,6 +26,11 @@ fi
 canonicalRepo="$(curl -fsSLI -o /dev/null -w '%{url_effective}\n' "$canonicalRepo")" # follow redirects (http://stackoverflow.com/a/3077316/433558)
 canonicalRepo="$(curl -fsSLI -o /dev/null -w '%{url_effective}\n' "$canonicalRepo")" # follow redirects (http://stackoverflow.com/a/3077316/433558)
 travisRepo="${canonicalRepo#*://github.com/}"
 travisRepo="${canonicalRepo#*://github.com/}"
 
 
+if [[ "$travisRepo" = elastic/* ]]; then
+	# Elastic points "github-repo" at their upstream elastic/xyz-docker repos, but we want our README stubs to still point at our integration repos
+	travisRepo="docker-library/$repo"
+fi
+
 maintainer="$(sed -e 's!%%GITHUB-REPO%%!'"$canonicalRepo"'!g' "$repo/maintainer.md")"
 maintainer="$(sed -e 's!%%GITHUB-REPO%%!'"$canonicalRepo"'!g' "$repo/maintainer.md")"
 
 
 if [ -f "$repo/deprecated.md" ]; then
 if [ -f "$repo/deprecated.md" ]; then