Skip to content

Commit a7fca2d

Browse files
author
Travis CI
committed
Fix titles in release index
1 parent 87a0d80 commit a7fca2d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

publish.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ HTML="$HTML
7676

7777
GITHUB_RELEASES="https://github.com/facebook/graphql/releases/tag"
7878
for GITTAG in $(git tag -l --sort='-*committerdate') ; do
79+
VERSIONYEAR=${GITTAG: -4}
80+
TAGTITLE="${GITTAG%$VERSIONYEAR} $VERSIONYEAR"
81+
TAGGEDCOMMIT=$(git rev-list -1 "$GITTAG")
82+
GITDATE=$(git show -s --format=%cd --date=format:"%a, %b %-d, %Y" $TAGGEDCOMMIT)
83+
7984
HTML="$HTML
8085
<tr>"
8186

@@ -84,10 +89,8 @@ for GITTAG in $(git tag -l --sort='-*committerdate') ; do
8489
<td></td>"
8590
HAS_LATEST_RELEASE=1
8691

87-
TAGGEDCOMMIT=$(git rev-list -1 "$GITTAG")
88-
GITDATE=$(git show -s --format=%cd --date=format:"%a, %b %-d, %Y" $TAGGEDCOMMIT)
8992
HTML="$HTML
90-
<td><a href=\"./$GITTAG\" keep-hash>$GITTAG</a></td>
93+
<td><a href=\"./$GITTAG\" keep-hash>$TAGTITLE</a></td>
9194
<td>$GITDATE</td>
9295
<td><a href=\"$GITHUB_RELEASES/$GITTAG\">Release Notes</a></td>
9396
</tr>"
@@ -100,6 +103,7 @@ HTML="$HTML
100103
for (var i = 0; i < links.length; i++) {
101104
if (links[i].hasAttribute('keep-hash')) {
102105
links[i].href += location.hash;
106+
links[i].removeAttribute('keep-hash');
103107
}
104108
}
105109
</script>

0 commit comments

Comments
 (0)