Skip to content

Commit

Permalink
Update javascript to pick up 1.10 examples (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
pleia2 authored Nov 18, 2017
1 parent a2bb3c6 commit b006a86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ function fillExamples() {
var baseUrl = "https://raw.githubusercontent.com/dcos/examples/master/" + packageName + "/";
// Example version
var exampleVersion = null;
// Check if 1.10 example exists
if (fs.existsSync(dcosExamplesFolder + "/" + packageName + "/1.10/README.md")) {
exampleVersion = "1.10";
// Check if 1.9 example exists
if (fs.existsSync(dcosExamplesFolder + "/" + packageName + "/1.9/README.md")) {
} else if (fs.existsSync(dcosExamplesFolder + "/" + packageName + "/1.9/README.md")) {
exampleVersion = "1.9";
} else if (fs.existsSync(dcosExamplesFolder + "/" + packageName + "/1.8/README.md")) {
exampleVersion = "1.8";
Expand Down

0 comments on commit b006a86

Please sign in to comment.