Repository: incubator-apex-site Updated Branches: refs/heads/master 25ca7edfb -> 8602d9b8d
Renaming fetch-versions to fetch-releases to match documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/commit/8602d9b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/tree/8602d9b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/diff/8602d9b8 Branch: refs/heads/master Commit: 8602d9b8dd9f23f62eeb0d76c6aec5d186187223 Parents: 25ca7ed Author: sashadt <[email protected]> Authored: Wed Jan 20 17:13:24 2016 -0800 Committer: sashadt <[email protected]> Committed: Wed Jan 20 17:13:24 2016 -0800 ---------------------------------------------------------------------- gulpfile.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/8602d9b8/gulpfile.js ---------------------------------------------------------------------- diff --git a/gulpfile.js b/gulpfile.js index d2b8a5a..0ad3be0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -280,7 +280,7 @@ gulp.task('fetch-roadmap', function(taskCb) { // 2. Queries Github for release tags to find the date they were published to github // 3. Writes to releases.json with release information. // -gulp.task('fetch-versions', function(taskCb) { +gulp.task('fetch-releases', function(taskCb) { // The base location for release listings var distUrl = 'https://dist.apache.org/repos/dist/'; @@ -326,7 +326,7 @@ gulp.task('fetch-versions', function(taskCb) { var releases = releaseLinks.map(function(el) { return { // Trim the href attribute of leading "v" and trailing slash - version: el.innerHTML.trim().replace(/^v/, '').replace(/\/$/, ''), + version: el.href.trim().replace(/^v/, '').replace(/\/$/, ''), // Add repo for use in async.each call below repo: target.repo }; @@ -350,13 +350,10 @@ gulp.task('fetch-versions', function(taskCb) { // Find hash for this release's tag for (var i = 0; i < lines.length; i++) { - if (lines[i] && lines[i].trim().length > 0) { - // console.log("Processing line[", i, "] : ", lines[i]); - var parts = lines[i].split('\t'); - if (parts[1] && parts[1].replace(/^refs\/tags\/v?/, '') === release.version) { - tagHash = parts[0]; - break; - } + var parts = lines[i].split('\t'); + if (parts[1].replace(/^refs\/tags\/v?/, '') === release.version) { + tagHash = parts[0]; + break; } }
