forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into fb62merge
- Loading branch information
Showing
50 changed files
with
948 additions
and
939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// @ts-check | ||
const {updateVersionsInFiles} = require('./versionUtils'); | ||
updateVersionsInFiles(); | ||
updateVersionsInFiles(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @ts-check | ||
const {updateVersionsInFiles} = require('./versionUtils'); | ||
updateVersionsInFiles('.0-microsoft'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// @ts-check | ||
// Used to apply the package updates: the git tag for the published release. | ||
|
||
const fs = require("fs"); | ||
const path = require("path"); | ||
const execSync = require("child_process").execSync; | ||
const {pkgJsonPath, publishBranchName, gatherVersionInfo} = require('./versionUtils'); | ||
|
||
function exec(command) { | ||
try { | ||
console.log(`Running command: ${command}`); | ||
return execSync(command, { | ||
stdio: "inherit" | ||
}); | ||
} catch (err) { | ||
process.exitCode = 1; | ||
console.log(`Failure running: ${command}`); | ||
throw err; | ||
} | ||
} | ||
|
||
function doPublish() { | ||
console.log(`Target branch to publish to: ${publishBranchName}`); | ||
|
||
const {releaseVersion, branchVersionSuffix} = gatherVersionInfo() | ||
|
||
const tempPublishBranch = `publish-temp-${Date.now()}`; | ||
exec(`git checkout -b ${tempPublishBranch}`); | ||
|
||
exec(`git config --global user.email "53619745+rnbot@users.noreply.github.com"`); | ||
exec(`git config --global user.name "React-Native Bot"`); | ||
|
||
exec(`git add ${pkgJsonPath}`); | ||
exec(`git commit -m "Applying package update to ${releaseVersion} ***NO_CI***"`); | ||
exec(`git tag v${releaseVersion}`); | ||
exec(`git push origin HEAD:${tempPublishBranch} --follow-tags --verbose`); | ||
exec(`git push origin tag v${releaseVersion}`); | ||
|
||
exec(`git checkout ${publishBranchName}`); | ||
exec(`git pull origin ${publishBranchName}`); | ||
exec(`git merge ${tempPublishBranch} --no-edit`); | ||
exec( | ||
`git push origin HEAD:${publishBranchName} --follow-tags --verbose` | ||
); | ||
exec(`git branch -d ${tempPublishBranch}`); | ||
exec(`git push origin --delete -d ${tempPublishBranch}`); | ||
} | ||
|
||
doPublish(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// @ts-check | ||
// Create a tar asset for publishing to the Office feed | ||
|
||
const fs = require("fs"); | ||
const path = require("path"); | ||
const execSync = require("child_process").execSync; | ||
const {pkgJsonPath, publishBranchName, gatherVersionInfo} = require('./versionUtils'); | ||
|
||
function exec(command) { | ||
try { | ||
console.log(`Running command: ${command}`); | ||
return execSync(command, { | ||
stdio: "inherit" | ||
}); | ||
} catch (err) { | ||
process.exitCode = 1; | ||
console.log(`Failure running: ${command}`); | ||
throw err; | ||
} | ||
} | ||
|
||
function doPublish() { | ||
console.log(`Target branch to publish to: ${publishBranchName}`); | ||
|
||
const {releaseVersion, branchVersionSuffix} = gatherVersionInfo() | ||
|
||
const onlyTagSource = !!branchVersionSuffix; | ||
if (!onlyTagSource) { | ||
// -------- Generating Android Artifacts with JavaDoc | ||
exec("gradlew installArchives"); | ||
|
||
// undo uncommenting javadoc setting | ||
exec("git checkout ReactAndroid/gradle.properties"); | ||
} | ||
|
||
// Create tar file | ||
exec(`npm pack`); | ||
|
||
const npmTarFileName = `react-native-${releaseVersion}.tgz`; | ||
const npmTarPath = path.resolve(__dirname, '..', npmTarFileName); | ||
const finalTarPath = path.join(process.env.BUILD_STAGINGDIRECTORY, 'final', npmTarFileName); | ||
console.log(`Copying tar file ${npmTarPath} to: ${finalTarPath}`) | ||
fs.copyFileSync(npmTarPath, finalTarPath); | ||
} | ||
|
||
doPublish(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// @ts-check | ||
const {updatePackageName} = require('./versionUtils'); | ||
updatePackageName('react-native-macos'); | ||
updatePackageName('react-native'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.