FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FAH bugfixes by inlined · Pull Request #6754 · firebase/firebase-tools · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) .ts  (3) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions CHANGELOG.md
This file contains hidden or 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 @@
Bugfixes to internal utilities (#6754)
4 changes: 2 additions & 2 deletions src/commands/apphosting-builds-create.ts
This file contains hidden or 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
Expand Up @@ -16,12 +16,12 @@ export const command = new Command("apphosting:builds:create <backendId>")
const buildId =
(options.buildId as string) ||
(await apphosting.getNextRolloutId(projectId, location, backendId));
const branch = options.branch as string;
const branch = (options.branch as string | undefined) ?? "main";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A really neat improvement to this would be to see if they have a RolloutPolicy and pull the "default" branch from there. But that can come later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

File a bug and assign it to me. I agree that would be much better, but IIRC rollouts is still an "internal tool" that hasn't gone through API review.


const op = await apphosting.createBuild(projectId, location, backendId, buildId, {
source: {
codebase: {
branch: "main",
branch,
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/gcp/apphosting.ts
This file contains hidden or 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
Expand Up @@ -531,7 +531,7 @@ export async function getNextRolloutId(
const year = date.getUTCFullYear();
// Note: month is 0 based in JS
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
const day = String(date.getUTCDay()).padStart(2, "0");
const day = String(date.getUTCDate()).padStart(2, "0");

if (counter) {
return `build-${year}-${month}-${day}-${String(counter).padStart(3, "0")}`;
Expand Down
2 changes: 1 addition & 1 deletion src/test/gcp/apphosting.spec.ts
This file contains hidden or 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
Expand Up @@ -17,7 +17,7 @@ describe("apphosting", () => {
function idPrefix(date: Date): string {
const year = date.getUTCFullYear();
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
const day = String(date.getUTCDay()).padStart(2, "0");
const day = String(date.getUTCDate()).padStart(2, "0");
return `build-${year}-${month}-${day}`;
}

Expand Down

Back | FazBrowse Home | New Git URL