Skip to content

Commit

Permalink
set expiry flag (FirebaseExtended#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuleatt authored Sep 25, 2020
1 parent a17a591 commit b9edd24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ build log.
### `expires` _{string}_

> ⚠️ This option isn't supported yet. If you set it, it will be ignored. See [issue #7](https://github.com/FirebaseExtended/action-hosting-deploy/issues/7) for context.

The length of time the channel should live. Default is 7 days.
The length of time the channel should live. If left blank, uses the Firebase Hosting default expiry (7 days).

### `projectId` _{string}_

Expand Down
2 changes: 1 addition & 1 deletion bin/action.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ export async function deploy(gacFilename: string, deployConfig: DeployConfig) {

const deploymentText = await execWithCredentials(
"npx firebase-tools",
["hosting:channel:deploy", channelId],
[
"hosting:channel:deploy",
channelId,
...(expires ? ["--expires", expires] : []),
],
projectId,
gacFilename
);
Expand Down

0 comments on commit b9edd24

Please sign in to comment.