-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fei-idempotentapp
- Loading branch information
Showing
4 changed files
with
96 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Update API reports | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
update_api_reports: | ||
name: Update API reports | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@master | ||
with: | ||
# checkout HEAD commit instead of merge commit | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }} | ||
- name: Set up Node (14) | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
- name: Yarn install | ||
run: yarn | ||
- name: Update API reports | ||
run: yarn ts-node-script scripts/exp/update-api-reports.ts | ||
id: update-api-reports | ||
- name: Commit & Push changes | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
add: 'common/api-review/*' | ||
message: 'Update API reports' | ||
default_author: github_actor |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* @license | ||
* Copyright 2021 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { spawn } from 'child-process-promise'; | ||
import simpleGit from 'simple-git/promise'; | ||
import { projectRoot } from '../utils'; | ||
|
||
const git = simpleGit(projectRoot); | ||
|
||
async function updateApiReports() { | ||
/** API reports are generated as part of the builds */ | ||
// TODO: change yarn command once exp packages become official | ||
await spawn('yarn', ['lerna', 'run', '--scope', '@firebase/*-exp', 'build'], { | ||
stdio: 'inherit' | ||
}); | ||
|
||
// build storage-exp | ||
await spawn( | ||
'yarn', | ||
['lerna', 'run', '--scope', '@firebase/storage', 'build:exp'], | ||
{ | ||
stdio: 'inherit' | ||
} | ||
); | ||
|
||
// build database-exp | ||
await spawn( | ||
'yarn', | ||
['lerna', 'run', '--scope', '@firebase/database', 'build:exp'], | ||
{ | ||
stdio: 'inherit' | ||
} | ||
); | ||
|
||
// generate public typings for firestore | ||
await spawn( | ||
'yarn', | ||
['lerna', 'run', '--scope', '@firebase/firestore', 'prebuild'], | ||
{ | ||
stdio: 'inherit' | ||
} | ||
); | ||
|
||
// Committing and Pushing to the remote branch is done in the GHA workflow, see .github/workflows/update-api-reports.yml | ||
} | ||
|
||
updateApiReports(); |