Skip to content

Commit 9926513

Browse files
authored
Merge pull request #1905 from amgleitman/0.72-merge-ado-fixes
Fix some ADO pipeline stuff
2 parents 3fa8887 + 9ca3c3a commit 9926513

File tree

5 files changed

+44
-25
lines changed

5 files changed

+44
-25
lines changed

.ado/apple-integration.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ jobs:
7474
cat package.json | jq .devDependencies
7575
displayName: Modify example app dependencies
7676
workingDirectory: react-native-test-app/example
77+
- template: templates/verdaccio-init.yml
78+
- bash: |
79+
npx beachball publish --branch origin/$(System.PullRequest.TargetBranch) --no-push --registry http://localhost:4873 --yes --access public
80+
displayName: Publish beachball packages to verdaccio
81+
- bash: |
82+
cat .yarnrc.yml | sed 's_^npmRegistryServer: ".*"$_npmRegistryServer: "http://localhost:4873"_' > .yarnrc.yml.copy
83+
rm .yarnrc.yml
84+
mv .yarnrc.yml.copy .yarnrc.yml
85+
echo -e '\nunsafeHttpWhitelist: ["localhost"]' >> .yarnrc.yml
86+
displayName: Point react-native-test-app registry to verdaccio server
87+
workingDirectory: react-native-test-app
7788
- bash: |
7889
yarn --no-immutable
7990
displayName: Install npm dependencies

.ado/templates/react-native-macos-init.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,14 @@ steps:
3131
cd packages/react-native-macos-init
3232
yarn build
3333
34-
- task: CmdLine@2
35-
displayName: Launch test npm server (verdaccio)
36-
inputs:
37-
script: |
38-
npx verdaccio --config ./.ado/verdaccio/config.yaml &
39-
40-
- script: |
41-
npm set registry http://localhost:4873
42-
displayName: Modify default npm config to point to local verdaccio server
43-
44-
- script: |
45-
node .ado/waitForVerdaccio.js
46-
displayName: Wait for verdaccio server to boot
47-
48-
- script: |
49-
node .ado/npmAddUser.js user pass mail@nomail.com http://localhost:4873
50-
displayName: Add npm user to verdaccio
34+
- template: verdaccio-init.yml
5135

5236
- task: CmdLine@2
5337
displayName: Set package version
5438
inputs:
5539
script: node scripts/set-rn-version.js -b dry-run -v 1000.0.0
5640

57-
- script: |
58-
npm publish --registry http://localhost:4873
59-
displayName: Publish react-native-macos to verdaccio
60-
61-
- script: |
62-
npx beachball publish --branch origin/$(System.PullRequest.TargetBranch) --no-push --registry http://localhost:4873 --yes --access public
63-
displayName: Publish react-native-macos-init to verdaccio
41+
- template: verdaccio-publish.yml
6442

6543
- task: CmdLine@2
6644
displayName: Init new project

.ado/templates/verdaccio-init.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Initializes a verdaccio server.
2+
3+
steps:
4+
- task: CmdLine@2
5+
displayName: Launch test npm server (verdaccio)
6+
inputs:
7+
script: |
8+
npx verdaccio --config ./.ado/verdaccio/config.yaml &
9+
10+
- script: |
11+
npm set registry http://localhost:4873
12+
displayName: Modify default npm config to point to local verdaccio server
13+
14+
- script: |
15+
node .ado/waitForVerdaccio.js
16+
displayName: Wait for verdaccio server to boot
17+
18+
- script: |
19+
node .ado/npmAddUser.js user pass mail@nomail.com http://localhost:4873
20+
displayName: Add npm user to verdaccio
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Publishes local packages to our verdaccio server.
2+
3+
steps:
4+
- script: |
5+
npm publish --registry http://localhost:4873
6+
displayName: Publish react-native-macos to verdaccio
7+
8+
- script: |
9+
npx beachball publish --branch origin/$(System.PullRequest.TargetBranch) --no-push --registry http://localhost:4873 --yes --access public
10+
displayName: Publish react-native-macos-init to verdaccio

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"@react-native/gradle-plugin": "^0.72.5",
125125
"@react-native/js-polyfills": "^0.72.1",
126126
"@react-native/normalize-colors": "^0.72.0",
127-
"@react-native-mac/virtualized-lists": "^0.0.1",
127+
"@react-native-mac/virtualized-lists": "^0.1.0",
128128
"abort-controller": "^3.0.0",
129129
"anser": "^1.4.9",
130130
"base64-js": "^1.1.2",

0 commit comments

Comments
 (0)