Explorar el Código

Use latest symlink

Christopher Mullins hace 6 años
padre
commit
57cb1d09b2
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 4 0
      .prepare_docs
  2. 2 2
      docs/gh-pages/index.html

+ 4 - 0
.prepare_docs

@@ -60,6 +60,10 @@ mkdir -p "${branch_docs_dir}"
 cp "${API_SPEC_FILE}" "${branch_docs_dir}"
 cp "${redoc_bundle_file}" "${branch_docs_dir}/index.html"
 
+# Update `latest` symlink to this branch
+rm -rf "${BRANCHES_DIR}/latest"
+ln -s "${branch_docs_dir}" "${BRANCHES_DIR}/latest"
+
 # Create a JSON file containing a list of all branches with docs (we'll
 # have an index page that renders the list).
 ls "${BRANCHES_DIR}" | jq -Rc '.' | jq -sc '.' > "${DIST_DIR}/branches.json"

+ 2 - 2
docs/gh-pages/index.html

@@ -38,10 +38,10 @@
                 var list = $('#version-list');
                 var html = '<thead><th>Version</th><th></th><th></th></thead><tbody>';
 
-                html += generateDocsRow('master');
+                html += generateDocsRow('latest');
 
                 data.forEach(function(x) {
-                  if (x != 'master') {
+                  if (x != 'latest') {
                     html += generateDocsRow(x);
                   }
                 });