Skip to content

Commit 80eb0c9

Browse files
committed
format and build
1 parent 43f1c76 commit 80eb0c9

File tree

3 files changed

+6
-43
lines changed

3 files changed

+6
-43
lines changed

bin/action.min.js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -92978,6 +92978,7 @@ async function execWithCredentials(args, projectId, gacFilename, opts) {
9297892978
}
9297992979
return deployOutputBuf.length ? deployOutputBuf[deployOutputBuf.length - 1].toString("utf-8") : ""; // output from the CLI
9298092980
}
92981+
9298192982
async function deployPreview(gacFilename, deployConfig) {
9298292983
const {
9298392984
projectId,
@@ -93008,20 +93009,6 @@ async function deployProductionSite(gacFilename, productionDeployConfig) {
9300893009
const deploymentResult = JSON.parse(deploymentText);
9300993010
return deploymentResult;
9301093011
}
93011-
async function deployWithForce(gacFilename, deployConfig) {
93012-
const {
93013-
projectId,
93014-
target,
93015-
firebaseToolsVersion,
93016-
force
93017-
} = deployConfig;
93018-
const deploymentText = await execWithCredentials(["deploy", "--only", `hosting${target ? ":" + target : ""}`, "--force"], projectId, gacFilename, {
93019-
firebaseToolsVersion,
93020-
force
93021-
});
93022-
const deploymentResult = JSON.parse(deploymentText);
93023-
return deploymentResult;
93024-
}
9302593012

9302693013
/**
9302793014
* Copyright 2020 Google LLC
@@ -93228,30 +93215,6 @@ async function run() {
9322893215
const gacFilename = await createGacFile(googleApplicationCredentials);
9322993216
console.log("Created a temporary file with Application Default Credentials.");
9323093217
core.endGroup();
93231-
if (force) {
93232-
core.startGroup("Deploying with force flag");
93233-
const deployment = await deployWithForce(gacFilename, {
93234-
projectId,
93235-
target,
93236-
firebaseToolsVersion,
93237-
force
93238-
});
93239-
if (deployment.status === "error") {
93240-
throw Error(deployment.error);
93241-
}
93242-
core.endGroup();
93243-
const hostname = target ? `${target}.web.app` : `${projectId}.web.app`;
93244-
const url = `https://${hostname}/`;
93245-
await finish({
93246-
details_url: url,
93247-
conclusion: "success",
93248-
output: {
93249-
title: `Production deploy succeeded`,
93250-
summary: `[${hostname}](${url})`
93251-
}
93252-
});
93253-
return;
93254-
}
9325593218
if (isProductionDeploy) {
9325693219
core.startGroup("Deploying to production site");
9325793220
const deployment = await deployProductionSite(gacFilename, {

src/deploy.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export type ChannelDeployConfig = DeployConfig & {
6666
force?: boolean;
6767
};
6868

69-
7069
export type ProductionDeployConfig = DeployConfig & {
7170
force?: boolean;
7271
};

test/deploy.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,11 @@ describe("deploy", () => {
210210
// @ts-ignore read-only property
211211
exec.exec = jest.fn(fakeExec);
212212

213-
const forceDeployOutput: ProductionSuccessResult = (await deployProductionSite(
214-
"my-file",
215-
forceProductionDeployConfig
216-
)) as ProductionSuccessResult;
213+
const forceDeployOutput: ProductionSuccessResult =
214+
(await deployProductionSite(
215+
"my-file",
216+
forceProductionDeployConfig
217+
)) as ProductionSuccessResult;
217218

218219
expect(exec.exec).toBeCalled();
219220
expect(forceDeployOutput).toEqual(liveDeploySingleSiteSuccess);

0 commit comments

Comments
 (0)