1
1
jobs :
2
2
- job : CliInit
3
- displayName : Verify react-native-macos-init
3
+ displayName : Verify react-native-macos in a new project
4
4
pool :
5
5
vmImage : $(VmImageApple)
6
6
steps :
@@ -13,80 +13,59 @@ jobs:
13
13
14
14
- template : /.ado/templates/apple-tools-setup.yml@self
15
15
16
- - task : CmdLine@2
17
- displayName : yarn install react-native-macos-init
18
- inputs :
19
- script : |
20
- set -eox pipefail
21
- cd packages/react-native-macos-init
22
- yarn install
16
+ - script : |
17
+ set -eox pipefail
18
+ yarn install
19
+ displayName: Install npm dependencies
23
20
24
- - task : CmdLine@2
21
+ - script : |
22
+ set -eox pipefail
23
+ yarn build
24
+ displayName: Build @react-native/community-cli-plugin
25
+
26
+ - script : |
27
+ set -eox pipefail
28
+ yarn build
29
+ workingDirectory: packages/react-native-macos-init
25
30
displayName: Build react-native-macos-init
26
- inputs :
27
- script : |
28
- set -eox pipefail
29
- cd packages/react-native-macos-init
30
- yarn build
31
31
32
32
- template : /.ado/templates/verdaccio-init.yml@self
33
33
34
- - template : /.ado/templates/verdaccio-publish.yml@self
35
-
36
- # First do a build of the local package, since we point the cli at the local files, it needs to be pre-built
37
- - task : CmdLine@2
38
- displayName : yarn install (local react-native-macos)
39
- inputs :
40
- script : |
41
- set -eox pipefail
42
- yarn install --immutable
43
-
44
- - task : CmdLine@2
45
- displayName : yarn install (local react-native-macos-init)
46
- inputs :
47
- script : |
48
- set -eox pipefail
49
- cd packages/react-native-macos-init
50
- yarn install --immutable
34
+ - script : |
35
+ .ado/scripts/verdaccio.sh publish --branch origin/$(System.PullRequest.TargetBranch)
36
+ displayName: Publish react-native-macos to Verdaccio
51
37
52
- - task : CmdLine@2
53
- displayName : yarn build (local react-native-macos-init)
54
- inputs :
55
- script : |
56
- set -eox pipefail
57
- cd packages/react-native-macos-init
58
- yarn build
38
+ - script : |
39
+ set -eox pipefail
40
+ npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install
41
+ workingDirectory: $(Agent.BuildDirectory)
42
+ displayName: Initialize a new project
59
43
60
- - task : CmdLine@2
61
- displayName : Init new project
62
- inputs :
63
- script : |
64
- set -eox pipefail
65
- npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install
66
- workingDirectory : $(Agent.BuildDirectory )
44
+ - script : |
45
+ set -eox pipefail
46
+ yarn install --mode=update-lockfile
47
+ # `update-lockfile` skips the linking step, so we need to run `yarn install` again
48
+ yarn install
49
+ workingDirectory: $(Agent.BuildDirectory)/ testcli
50
+ displayName: Install npm dependencies (new project )
67
51
68
- - task : CmdLine@2
69
- displayName : yarn install (testcli)
70
- inputs :
71
- script : |
72
- set -eox pipefail
73
- yarn install --mode=update-lockfile
74
- # `update-lockfile` skips the linking step, so we need to run `yarn install` again
75
- yarn install
76
- workingDirectory : $(Agent.BuildDirectory)/testcli
52
+ - script : |
53
+ set -eox pipefail
54
+ # We need to set the npm registry here otherwise it won't stick
55
+ $(Build.Repository.LocalPath)/.ado/scripts/verdaccio.sh configure
56
+ node $(Build.Repository.LocalPath)/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease
57
+ yarn why react-native-macos
58
+ workingDirectory: $(Agent.BuildDirectory)/testcli
59
+ displayName: Apply macOS template (new project)
77
60
78
- - task : CmdLine@2
79
- displayName : Apply macos template
80
- inputs :
81
- script : |
82
- set -eox pipefail
83
- npx react-native-macos-init --version latest --overwrite --prerelease
84
- workingDirectory : $(Agent.BuildDirectory)/testcli
61
+ - script : |
62
+ set -eox pipefail
63
+ npx react-native build-macos
64
+ workingDirectory: $(Agent.BuildDirectory)/testcli
65
+ displayName: Build macOS app (new project)
85
66
86
- - task : CmdLine@2
87
- displayName : Run macos [test]
88
- inputs :
89
- script : |
90
- set -eox pipefail
91
- npx react-native run-macos
92
- workingDirectory : $(Agent.BuildDirectory)/testcli
67
+ - script : |
68
+ set -eox pipefail
69
+ npx react-native run-macos
70
+ workingDirectory: $(Agent.BuildDirectory)/testcli
71
+ displayName: Run macOS app (new project)
0 commit comments