Skip to content

Commit 774695a

Browse files
committed
Release - use yarn instead of npm
1 parent 61116ff commit 774695a

File tree

1 file changed

+5
-3
lines changed
  • packages/react-native-ui-lib/scripts/release

1 file changed

+5
-3
lines changed

packages/react-native-ui-lib/scripts/release/release.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ function versionTagAndPublish() {
6666
}
6767

6868
function findCurrentPublishedVersion() {
69-
return exec.execSyncRead(`npm view ${process.env.npm_package_name} dist-tags.latest`);
69+
const result = exec.execSyncRead(`yarn npm info ${process.env.npm_package_name} --fields dist-tags --json`);
70+
const parsed = JSON.parse(result);
71+
return parsed['dist-tags'].latest;
7072
}
7173

7274
function tryPublishAndTag(version) {
@@ -89,8 +91,8 @@ function tryPublishAndTag(version) {
8991

9092
function tagAndPublish(newVersion) {
9193
console.log(`trying to publish ${newVersion}...`);
92-
exec.execSync(`npm --no-git-tag-version version ${newVersion}`);
93-
exec.execSync(`npm publish --tag ${VERSION_TAG}`);
94+
exec.execSync(`yarn version ${newVersion}`);
95+
exec.execSync(`yarn npm publish --tag ${VERSION_TAG}`);
9496
if (isRelease) {
9597
exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
9698
}

0 commit comments

Comments
 (0)