From e2e8bf37f014d5e0efebd7f9ec350edd11fd601d Mon Sep 17 00:00:00 2001 From: Silvano Luciani Date: Mon, 13 Oct 2014 15:48:31 -0700 Subject: [PATCH] fix(docs): make sure to pass a valid version to semver When running the docs locally, master could be the only version in versions.txt, and semver doesn't like it. By hardcoding in insanely high version number, we avoid that while making sure that we get all the modules for the latest version. --- docs/components/docs/docs-services.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/components/docs/docs-services.js b/docs/components/docs/docs-services.js index f7de286e69d..cadf03f722e 100644 --- a/docs/components/docs/docs-services.js +++ b/docs/components/docs/docs-services.js @@ -8,8 +8,11 @@ angular.module('gcloud.docs') var VERSIONS = pages.VERSIONS; if (version === 'master') { - // Use the most recent release. - version = versions[0]; + // Set an insanely high version. This is because for master we need + // all the modules from the latest version, but when executed locally, + // we don't know which one is the latest unless we manually add to + // versions.txt + version = '1000.0.0'; } // Use semver matching to put all matching modules together.