mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Yet another fix for CI to find branch that contaisn tag latest
Reviewed By: svcscm Differential Revision: D2937802 fb-gh-sync-id: 3bd617d5fc7fea42d264acfbd229fd15b335a95d shipit-source-id: 3bd617d5fc7fea42d264acfbd229fd15b335a95d
This commit is contained in:
parent
e5ba46c30d
commit
ecb1643fee
@ -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:
|
||||
|
@ -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`) {
|
||||
|
2
website/src/react-native/versions.js
vendored
2
website/src/react-native/versions.js
vendored
@ -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
|
||||
}
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user