mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08: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:
committed by
facebook-github-bot-5
parent
e5ba46c30d
commit
ecb1643fee
@@ -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
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user