Selaa lähdekoodia

Fix Travis URLs for java vs openjdk

Tianon Gravi 9 vuotta sitten
vanhempi
sitoutus
447674f701
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      generate-repo-stub-readme.sh

+ 4 - 1
generate-repo-stub-readme.sh

@@ -19,6 +19,9 @@ fi
 gitRepo='https://github.com/docker-library/docs'
 hubPage="https://registry.hub.docker.com/_/$repo/"
 
+canonicalRepo="$(curl -fsSLI -o /dev/null -w '%{url_effective}\n' "https://github.com/docker-library/$repo")" # follow redirects (http://stackoverflow.com/a/3077316/433558)
+travisRepo="${canonicalRepo#*://github.com/}"
+
 cat <<EOREADME
 # About this Repo
 
@@ -28,7 +31,7 @@ The full readme is generated over in [docker-library/docs]($gitRepo), specificia
 
 See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/$repo" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/$repo), especially [PRs with the "library/$repo" label on that repo](https://github.com/docker-library/official-images/labels/library%2F$repo). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md).
 
-[![Travis CI](https://img.shields.io/travis/docker-library/$repo/master.svg)](https://travis-ci.org/docker-library/$repo/branches)
+[![Travis CI](https://img.shields.io/travis/$travisRepo/master.svg)](https://travis-ci.org/$travisRepo/branches)
 
 <!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->
 EOREADME