Skip to content

Commit

Permalink
fix(docs): make sure to pass a valid version to semver
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
silvolu committed Oct 13, 2014
1 parent 00e6466 commit e2e8bf3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/components/docs/docs-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e2e8bf3

Please sign in to comment.