diff --git a/circle.yml b/circle.yml index 589a7c9a9d9..7500233d0ce 100644 --- a/circle.yml +++ b/circle.yml @@ -4,7 +4,7 @@ general: - gh-pages # list of branches to ignore machine: node: - version: 5.1.0 + version: 5.6.0 environment: PATH: "~/$CIRCLE_PROJECT_REPONAME/gradle-2.9/bin:$PATH" TERM: "dumb" @@ -22,11 +22,8 @@ dependencies: - buck/bin/buck fetch ReactAndroid/src/main/java/com/facebook/react/shell - buck/bin/buck fetch ReactAndroid/src/test/... - buck/bin/buck fetch ReactAndroid/src/androidTest/... - # using npm@3 because of problems with shrink-wrapped optional deps installs on linux - - npm install -g npm@3.2 - source scripts/circle-ci-android-setup.sh && getAndroidSDK - ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog - - cd website && npm install cache_directories: - "ReactAndroid/build/downloads" - "buck" @@ -34,6 +31,7 @@ dependencies: - "website/node_modules" override: - npm install + - cd website && npm install test: pre: diff --git a/website/publish-gh-pages.js b/website/publish-gh-pages.js index 2368f10cfc8..25e43d6ea4d 100644 --- a/website/publish-gh-pages.js +++ b/website/publish-gh-pages.js @@ -35,10 +35,10 @@ mkdir(`-p`, `build`); const currentCommit = exec(`git rev-parse HEAD`).stdout.trim(); const latestTagCommit = exec(`git ls-remote origin latest`).stdout.split(/\s/)[0]; // pass along which branch contains latest version so that gh-pages root could mark it as latest -const branchWithLatestTag = exec(`git branch --contains latest`).stdout; +const branchWithLatestTag = exec(`git branch -r --contains ${latestTagCommit}`).stdout.split('/')[1]; let latestVersion = ``; if (branchWithLatestTag.indexOf(`-stable`) !== -1) { - latestVersion = branchWithLatestTag.slice(0, branchWithLatestTag.indexOf(`-stable`)).trim(); + latestVersion = branchWithLatestTag.slice(0, branchWithLatestTag.indexOf(`-stable`)); } if (!CI_PULL_REQUEST && CIRCLE_PROJECT_USERNAME === `facebook`) { diff --git a/website/src/react-native/versions.js b/website/src/react-native/versions.js index 416dbc1eeab..fecf68d5e17 100644 --- a/website/src/react-native/versions.js +++ b/website/src/react-native/versions.js @@ -24,7 +24,7 @@ var versions = React.createClass({ ].concat(availableDocs.map((version) => { const isLatest = Metadata.config.RN_LATEST_VERSION === version; return { - title: isLatest ? `${version} + (current)` : version, + title: isLatest ? `${version} (current)` : version, path: isLatest ? '/react-native' : '/react-native/releases/' + version } }));