File tree Expand file tree Collapse file tree 3 files changed +37
-9
lines changed Expand file tree Collapse file tree 3 files changed +37
-9
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,10 @@ stages:
26
26
dependsOn : []
27
27
jobs :
28
28
- template : /.ado/jobs/test-javascript.yml@self
29
-
30
29
- template : /.ado/jobs/npm-publish-dry-run.yml@self
31
30
32
- # - stage: Integration
33
- # dependsOn: []
34
- # jobs:
35
- # - template: /.ado/jobs/test-react-native-macos-init.yml@self
36
-
37
- # - template: /.ado/jobs/react-native-test-app-integration.yml@self
31
+ - stage : Integration
32
+ dependsOn : []
33
+ jobs :
34
+ - template : /.ado/jobs/test-react-native-macos-init.yml@self
35
+ # - template: /.ado/jobs/react-native-test-app-integration.yml@self
Original file line number Diff line number Diff line change 35
35
.ado/scripts/verdaccio.sh publish --branch origin/$(System.PullRequest.TargetBranch)
36
36
displayName: Publish react-native-macos to Verdaccio
37
37
38
+ - script : |
39
+ node .ado/scripts/export-versions.mjs
40
+ displayName: Determine react-native version
41
+
38
42
- script : |
39
43
set -eox pipefail
40
- npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install
44
+ npx --yes @react-native-community/cli init testcli --version $(react_native_version) --skip-install
41
45
workingDirectory: $(Agent.BuildDirectory)
42
46
displayName: Initialize a new project
43
47
54
58
# We need to set the npm registry here otherwise it won't stick
55
59
$(Build.Repository.LocalPath)/.ado/scripts/verdaccio.sh configure
56
60
node $(Build.Repository.LocalPath)/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease
57
- yarn why react-native-macos
58
61
workingDirectory: $(Agent.BuildDirectory)/testcli
59
62
displayName: Apply macOS template (new project)
60
63
Original file line number Diff line number Diff line change
1
+ // @ts -check
2
+ import * as fs from "node:fs" ;
3
+ import { URL } from "node:url" ;
4
+
5
+ /**
6
+ * @param {string } version
7
+ * @returns {string }
8
+ */
9
+ function coerce ( version ) {
10
+ const [ major , minor = 0 ] = version . split ( "-" ) [ 0 ] . split ( "." ) ;
11
+ return `${ major } .${ minor } ` ;
12
+ }
13
+
14
+ /**
15
+ * @param {string } name
16
+ * @param {unknown } value
17
+ */
18
+ function exportValue ( name , value ) {
19
+ console . log ( `##vso[task.setvariable variable=${ name } ]${ value } ` ) ;
20
+ }
21
+
22
+ const manifestPath = new URL ( "../../packages/react-native/package.json" , import . meta. url ) ;
23
+ const json = fs . readFileSync ( manifestPath , { encoding : "utf-8" } ) ;
24
+ const { dependencies, peerDependencies } = JSON . parse ( json ) ;
25
+
26
+ exportValue ( "react_version" , peerDependencies [ "react" ] ) ;
27
+ exportValue ( "react_native_version" , coerce ( dependencies [ "@react-native/codegen" ] ) ) ;
You can’t perform that action at this time.
0 commit comments