forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge branch '0.74-stable' into user/yicyao/cg-0.74
Showing
43 changed files
with
431 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
jobs: | ||
- job: CliInit | ||
displayName: Verify react-native-macos-init | ||
displayName: Verify react-native-macos in a new project | ||
pool: | ||
vmImage: $(VmImageApple) | ||
steps: | ||
|
@@ -13,50 +13,59 @@ jobs: | |
|
||
- template: /.ado/templates/apple-tools-setup.yml@self | ||
|
||
- script: | | ||
set -eox pipefail | ||
yarn install | ||
displayName: Install npm dependencies | ||
- script: | | ||
set -eox pipefail | ||
yarn build | ||
displayName: Build @react-native/community-cli-plugin | ||
- script: | | ||
set -eox pipefail | ||
yarn build | ||
workingDirectory: packages/react-native-macos-init | ||
displayName: Build react-native-macos-init | ||
- template: /.ado/templates/verdaccio-init.yml@self | ||
|
||
- template: /.ado/templates/verdaccio-publish.yml@self | ||
|
||
# First do a build of the local package, since we point the cli at the local files, it needs to be pre-built | ||
- task: CmdLine@2 | ||
displayName: yarn install (local react-native-macos) | ||
inputs: | ||
script: yarn install --immutable | ||
|
||
- task: CmdLine@2 | ||
displayName: yarn install (local react-native-macos-init) | ||
inputs: | ||
script: | | ||
cd packages/react-native-macos-init | ||
yarn install --immutable | ||
- task: CmdLine@2 | ||
displayName: yarn build (local react-native-macos-init) | ||
inputs: | ||
script: | | ||
cd packages/react-native-macos-init | ||
yarn build | ||
- task: CmdLine@2 | ||
displayName: Init new project | ||
inputs: | ||
script: npx --yes [email protected] init testcli --template [email protected] --skip-install | ||
workingDirectory: $(Agent.BuildDirectory) | ||
|
||
- task: CmdLine@2 | ||
displayName: yarn install (local react-native-macos-init) | ||
inputs: | ||
script: yarn install --immutable | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
|
||
- task: CmdLine@2 | ||
displayName: Apply macos template | ||
inputs: | ||
script: npx react-native-macos-init --version latest --overwrite --prerelease | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
|
||
- task: CmdLine@2 | ||
displayName: Run macos [test] | ||
inputs: | ||
script: npx react-native run-macos | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
- script: | | ||
.ado/scripts/verdaccio.sh publish --branch origin/$(System.PullRequest.TargetBranch) | ||
displayName: Publish react-native-macos to Verdaccio | ||
- script: | | ||
set -eox pipefail | ||
npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install | ||
workingDirectory: $(Agent.BuildDirectory) | ||
displayName: Initialize a new project | ||
- script: | | ||
set -eox pipefail | ||
yarn install --mode=update-lockfile | ||
# `update-lockfile` skips the linking step, so we need to run `yarn install` again | ||
yarn install | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
displayName: Install npm dependencies (new project) | ||
- script: | | ||
set -eox pipefail | ||
# We need to set the npm registry here otherwise it won't stick | ||
$(Build.Repository.LocalPath)/.ado/scripts/verdaccio.sh configure | ||
node $(Build.Repository.LocalPath)/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease | ||
yarn why react-native-macos | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
displayName: Apply macOS template (new project) | ||
- script: | | ||
set -eox pipefail | ||
npx react-native build-macos | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
displayName: Build macOS app (new project) | ||
- script: | | ||
set -eox pipefail | ||
npx react-native run-macos | ||
workingDirectory: $(Agent.BuildDirectory)/testcli | ||
displayName: Run macOS app (new project) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
NPM_REGISTRY=http://localhost:4873 | ||
|
||
project_root=$(cd -P "$(dirname $0)" && pwd) | ||
|
||
set -eox pipefail | ||
|
||
case ${1-} in | ||
"configure") | ||
yarn config set npmRegistryServer $NPM_REGISTRY | ||
yarn config set unsafeHttpWhitelist --json '["localhost"]' | ||
;; | ||
|
||
"init") | ||
npm set registry $NPM_REGISTRY | ||
npx verdaccio --config $project_root/.ado/verdaccio/config.yaml & | ||
node $project_root/.ado/waitForVerdaccio.js | ||
node $project_root/.ado/npmAddUser.js user pass [email protected] $NPM_REGISTRY | ||
;; | ||
|
||
"publish") | ||
checkpoint=$(git rev-parse HEAD) | ||
yarn set-version 1000.0.0-pr | ||
git commit --all --message 'bump' --no-verify | ||
packages=() | ||
for json in $(yarn workspaces list --no-private --json); do | ||
packages+=(--package $(node --print "JSON.parse('$json').name")) | ||
done | ||
npx beachball change --no-fetch --type patch --message 'bump for testing purposes' ${packages[@]} | ||
npx beachball $* --no-push --registry $NPM_REGISTRY --yes --access public --no-generate-changelog | ||
git reset --hard $checkpoint | ||
;; | ||
esac |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.