Skip to content

Commit 80024b6

Browse files
committed
change how we init windows on 0.76+
1 parent e53ec9a commit 80024b6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

new-release-tools.js

+16-4
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,22 @@ function createNewRelease(newRelease, rnVersion, apptype) {
6060
appDir
6161
);
6262
} else {
63-
runCmd(
64-
`npx --yes react-native-windows-init --version ${newRelease} --overwrite --language ${apptype}`,
65-
appDir
66-
);
63+
if (semver.compare(newRelease, '0.76.0-0') === 1) {
64+
runCmd(
65+
`yarn add react-native-windows@${newRelease}`,
66+
appDir
67+
);
68+
runCmd(
69+
`npx @react-native-community/cli init-windows --template old/uwp-${apptype}-app`,
70+
appDir
71+
);
72+
} else {
73+
runCmd(
74+
`npx --yes react-native-windows-init --version ${newRelease} --overwrite --language ${apptype}`,
75+
appDir
76+
);
77+
}
78+
6779
// Modify some files to prevent new guids being generated and showing up in the diffs
6880
runCmd(`node ../standardizeProj.js`, wtAppPath);
6981
}

0 commit comments

Comments
 (0)