Skip to content

Commit 97f8b10

Browse files
committed
add firestore to the exp release script
1 parent 386834e commit 97f8b10

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

scripts/exp/prepare-firestore-for-exp-release.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const writeFile = promisify(_writeFile);
2323
const packagePath = `${projectRoot}/packages/firestore`;
2424

2525
// Prepare @firebase/firestore, so scripts/exp/release.ts can be used to release it
26-
async function prepare() {
26+
export async function prepare() {
2727
// Build exp and lite packages
2828
await spawn('yarn', ['build:exp'], {
2929
cwd: packagePath,
@@ -64,5 +64,3 @@ async function prepare() {
6464
{ encoding: 'utf-8' }
6565
);
6666
}
67-
68-
prepare();

scripts/exp/release.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { writeFile as _writeFile } from 'fs';
2626
import { promisify } from 'util';
2727
import chalk from 'chalk';
2828
import Listr from 'listr';
29+
import { prepare as prepareAndBuildFirestore } from './prepare-firestore-for-exp-release';
2930

3031
const writeFile = promisify(_writeFile);
3132
const git = simpleGit(projectRoot);
@@ -43,11 +44,18 @@ async function publishExpPackages() {
4344
*/
4445
await buildPackages();
4546

47+
/**
48+
* prepare and build firestore
49+
*/
50+
await prepareAndBuildFirestore();
51+
4652
// path to exp packages
4753
const packagePaths = await mapWorkspaceToPackages([
4854
`${projectRoot}/packages-exp/*`
4955
]);
5056

57+
packagePaths.push(`${projectRoot}/packages/firestore`);
58+
5159
/**
5260
* It does 2 things:
5361
*
@@ -62,26 +70,26 @@ async function publishExpPackages() {
6270
/**
6371
* Release packages to NPM
6472
*/
65-
await publishToNpm(packagePaths);
73+
// await publishToNpm(packagePaths);
6674

6775
/**
6876
* reset the working tree to recover package names with -exp in the package.json files,
6977
* then bump patch version of firebase-exp (the umbrella package) only
7078
*/
71-
const firebaseExpVersion = new Map<string, string>();
72-
firebaseExpVersion.set(
73-
FIREBASE_UMBRELLA_PACKAGE_NAME,
74-
versions.get(FIREBASE_UMBRELLA_PACKAGE_NAME)
75-
);
76-
const firebaseExpPath = packagePaths.filter(p =>
77-
p.includes(FIREBASE_UMBRELLA_PACKAGE_NAME)
78-
);
79-
await resetWorkingTreeAndBumpVersions(firebaseExpPath, firebaseExpVersion);
79+
// const firebaseExpVersion = new Map<string, string>();
80+
// firebaseExpVersion.set(
81+
// FIREBASE_UMBRELLA_PACKAGE_NAME,
82+
// versions.get(FIREBASE_UMBRELLA_PACKAGE_NAME)
83+
// );
84+
// const firebaseExpPath = packagePaths.filter(p =>
85+
// p.includes(FIREBASE_UMBRELLA_PACKAGE_NAME)
86+
// );
87+
// await resetWorkingTreeAndBumpVersions(firebaseExpPath, firebaseExpVersion);
8088

8189
/**
8290
* push to github
8391
*/
84-
await commitAndPush(versions);
92+
// await commitAndPush(versions);
8593
} catch (err) {
8694
/**
8795
* Log any errors that happened during the process

0 commit comments

Comments
 (0)