Skip to content

Commit

Permalink
fix windows init script (#13632)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yajur-Grover authored Sep 9, 2024
1 parent 3ceb95c commit 60ec2c3
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions .ado/templates/react-native-init-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,17 @@ steps:
configuration: Release

- ${{ if endsWith(parameters.template, '-app') }}:
- script: | # Change version of @react-native-community/template from 'nightly' to '$(reactNativeDevDependency)' - Windows #13446
npx --yes @react-native-community/cli@next init testcli --template @react-native-community/template@nightly
- script: |
npx --yes @react-native-community/cli@next init testcli --version $(reactNativeDevDependency)
displayName: Init new app project with @react-native-community/cli init
workingDirectory: $(Agent.BuildDirectory)
- script: | # Remove upgrade command - Windows #13446
call yarn install
call yarn add react@$(reactDevDependency)
call yarn add react-native@$(reactNativeDevDependency)
displayName: Fix app react-native dependency
workingDirectory: $(Agent.BuildDirectory)\testcli
- ${{ if and(endsWith(parameters.template, '-lib'), not(startsWith(parameters.template, 'old'))) }}:
- script: | # Change version of react-native from 'next' to '$(reactNativeDevDependency)' - Windows #13446
npx --yes create-react-native-library@latest --slug testcli --description testcli --author-name "React-Native-Windows Bot" --author-email 53619745+rnbot@users.noreply.github.com --author-url http://example.com --repo-url http://example.com --languages kotlin-objc --type module-new --react-native-version next --example vanilla testcli
- script: |
npx --yes create-react-native-library@latest --slug testcli --description testcli --author-name "React-Native-Windows Bot" --author-email 53619745+rnbot@users.noreply.github.com --author-url http://example.com --repo-url http://example.com --languages kotlin-objc --type module-new --react-native-version $(reactNativeDevDependency) --example vanilla testcli
displayName: Init new lib project with create-react-native-library
workingDirectory: $(Agent.BuildDirectory)
- script: | # Remove upgrade commands - Windows #13446
call yarn install
call yarn add react@$(reactDevDependency) --dev
call yarn add react-native@$(reactNativeDevDependency) --dev
displayName: Fix lib react-native dependency
workingDirectory: $(Agent.BuildDirectory)\testcli
- script: | # Remove upgrade commands - Windows #13446
call yarn install
call yarn add react@$(reactDevDependency)
call yarn add react-native@$(reactNativeDevDependency)
displayName: Fix example app react-native dependency
workingDirectory: $(Agent.BuildDirectory)\testcli\example
- ${{ elseif and(endsWith(parameters.template, '-lib'), startsWith(parameters.template, 'old')) }}:
- script: |
npx --yes create-react-native-module@0.20.2 --package-name "testcli" testcli
Expand Down

0 comments on commit 60ec2c3

Please sign in to comment.