Skip to content

Commit

Permalink
Dont have prepare-package-for-release do anything
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna Wei committed Jan 21, 2022
1 parent 4186396 commit 9d180ff
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions scripts/prepare-package-for-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,48 @@ if (version == null) {
exit(1);
}

if (exec(`node scripts/set-rn-version.js --to-version ${version}`).code) {
echo(`Failed to set React Native version to ${version}`);
exit(1);
}
console.log(`Passed version: ${releaseVersion}, ${version}. Latest: ${isLatest}, Branch: ${branch}`);

// Release builds should commit the version bumps, and create tags.
echo('Updating RNTester Podfile.lock...');
if (exec('source scripts/update_podfile_lock.sh && update_pods').code) {
echo('Failed to update RNTester Podfile.lock.');
echo('Fix the issue, revert and try again.');
exit(1);
}
// if (exec(`node scripts/set-rn-version.js --to-version ${version}`).code) {
// echo(`Failed to set React Native version to ${version}`);
// exit(1);
// }

// Make commit [0.21.0-rc] Bump version numbers
if (exec(`git commit -a -m "[${version}] Bump version numbers"`).code) {
echo('failed to commit');
exit(1);
}
// // Release builds should commit the version bumps, and create tags.
// echo('Updating RNTester Podfile.lock...');
// if (exec('source scripts/update_podfile_lock.sh && update_pods').code) {
// echo('Failed to update RNTester Podfile.lock.');
// echo('Fix the issue, revert and try again.');
// exit(1);
// }

// Add tag v0.21.0-rc.1
if (exec(`git tag -a v${version} -m "v${version}"`).code) {
echo(
`failed to tag the commit with v${version}, are you sure this release wasn't made earlier?`,
);
echo('You may want to rollback the last commit');
echo('git reset --hard HEAD~1');
exit(1);
}
// // Make commit [0.21.0-rc] Bump version numbers
// if (exec(`git commit -a -m "[${version}] Bump version numbers"`).code) {
// echo('failed to commit');
// exit(1);
// }

// See if `latest` was set on the commit that triggered this script
// If yes, move the tag to commit we just made
// This tag will also update npm release as `latest`
if (isLatest) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
// // Add tag v0.21.0-rc.1
// if (exec(`git tag -a v${version} -m "v${version}"`).code) {
// echo(
// `failed to tag the commit with v${version}, are you sure this release wasn't made earlier?`,
// );
// echo('You may want to rollback the last commit');
// echo('git reset --hard HEAD~1');
// exit(1);
// }

// This will be pushed with the `--follow-tags`
exec('git tag -a latest -m "latest"');
}
// // See if `latest` was set on the commit that triggered this script
// // If yes, move the tag to commit we just made
// // This tag will also update npm release as `latest`
// if (isLatest) {
// exec('git tag -d latest');
// exec(`git push ${remote} :latest`);

// // This will be pushed with the `--follow-tags`
// exec('git tag -a latest -m "latest"');
// }

exec(`git push ${remote} ${branch} --follow-tags`);
// exec(`git push ${remote} ${branch} --follow-tags`);

exit(0);

0 comments on commit 9d180ff

Please sign in to comment.