1+ parameters :
2+ configuration :
3+
4+ steps :
5+ - checkout : self # self represents the repo where the initial Pipelines YAML file was found
6+ clean : true # whether to fetch clean each time
7+ # fetchDepth: 2 # the depth of commits to ask Git to fetch
8+ lfs : false # whether to download Git-LFS files
9+ submodules : false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
10+ persistCredentials : false # set to 'true' to leave the OAuth token in the Git config after the initial fetch
11+
12+ # First do a build of the local package, since we point the cli at the local files, it needs to be pre-built
13+ - task : CmdLine@2
14+ displayName : yarn install (local react-native-macos)
15+ inputs :
16+ script : yarn install --frozen-lockfile
17+
18+ - task : CmdLine@2
19+ displayName : yarn install (local react-native-macos-init)
20+ inputs :
21+ script : |
22+ cd packages/react-native-macos-init
23+ yarn install
24+
25+ - task : CmdLine@2
26+ displayName : yarn build (local react-native-macos-init)
27+ inputs :
28+ script : |
29+ cd packages/react-native-macos-init
30+ yarn build
31+
32+ - task : CmdLine@2
33+ displayName : Install Verdaccio
34+ inputs :
35+ script : |
36+ npm install --global verdaccio
37+
38+ - task : CmdLine@2
39+ displayName : Install n used by ado-start-verdaccio.sh
40+ inputs :
41+ script : |
42+ npm install --global n
43+
44+ - task : ShellScript@2
45+ displayName : Launch test npm server (verdaccio)
46+ inputs :
47+ scriptPath : ' .ado/ado-start-verdaccio.sh'
48+ disableAutoCwd : true
49+ cwd : ' '
50+
51+ - script : |
52+ npm set registry http://localhost:4873
53+ displayName: Modify default npm config to point to local verdaccio server
54+
55+ - script : |
56+ node .ado/waitForVerdaccio.js
57+ displayName: Wait for verdaccio server to boot
58+
59+ - script : |
60+ node .ado/npmAddUser.js user pass [email protected] http://localhost:4873 61+ displayName: Add npm user to verdaccio
62+
63+ - task : CmdLine@2
64+ displayName : Bump package version
65+ inputs :
66+ script : node .ado/bumpFileVersions.js
67+
68+ - task : CmdLine@2
69+ displayName : " Prepare package.json for npm publishing as react-native-macos"
70+ inputs :
71+ script : node .ado/renamePackageToMac.js
72+
73+ - script : |
74+ npm publish --registry http://localhost:4873
75+ displayName: Publish react-native-macos to verdaccio
76+
77+ - script : |
78+ cd packages/react-native-macos-init
79+ npx --no-install beachball publish --branch origin/$(System.PullRequest.TargetBranch) --no-push --registry http://localhost:4873 --yes --access public
80+ displayName: Publish react-native-macos-init to verdaccio
81+
82+ - task : CmdLine@2
83+ displayName : Install react-native cli
84+ inputs :
85+ script : npm install -g react-native-cli
86+
87+ - task : CmdLine@2
88+ displayName : Init new project
89+ inputs :
90+ script : react-native init testcli
91+ workingDirectory : $(Agent.BuildDirectory)
92+
93+ - task : CmdLine@2
94+ displayName : Apply macos template
95+ inputs :
96+ script : npx react-native-macos-init --version latest --overwrite --prerelease
97+ workingDirectory : $(Agent.BuildDirectory)/testcli
98+
99+ # TODO: react-native run-macos and test when implemented
0 commit comments