Skip to content

Commit 2d51b87

Browse files
authored
Merge pull request #61 from firebase/davidmotson.m139_fixes
Fixes post M139
2 parents 5e76269 + b75cce5 commit 2d51b87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

functions/utils/utils.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ function convertReleaseDatesToTimestamps(releases) {
6969
* provided parameters.
7070
*/
7171
function calculateReleaseState(codeFreeze, release, isReleased) {
72+
if (isReleased) {
73+
return RELEASE_STATES.RELEASED
74+
}
7275
const now = new Date();
7376

7477
// Get time difference in milliseconds
@@ -86,7 +89,7 @@ function calculateReleaseState(codeFreeze, release, isReleased) {
8689
} else if (diffDaysCodeFreeze < 0 && diffDaysRelease === 0) {
8790
return RELEASE_STATES.RELEASE_DAY;
8891
} else if (diffDaysRelease < 0) {
89-
return isReleased ? RELEASE_STATES.RELEASED : RELEASE_STATES.DELAYED;
92+
return RELEASE_STATES.DELAYED;
9093
} else {
9194
throw new Error(`Unable to calculate release state between
9295
${codeFreeze} and ${release} dates`);
@@ -177,7 +180,7 @@ function getCommitIdsFromChanges(libraryChanges) {
177180
function mergeKtxIntoRoot(libraryData) {
178181
for (const key in libraryData) {
179182
if (key.includes("/ktx")) {
180-
const rootKey = key.split("/")[0];
183+
const rootKey = key.split("/").slice(0,-1).join("/");
181184

182185
// If the root library exists, merge the '/ktx' data into it
183186
// otherwise, create a new root library with the '/ktx' data

0 commit comments

Comments
 (0)