diff --git a/.github/scripts/release_notes/android-release.js b/.github/scripts/release_notes/android-release.js index 0dfdd278ba..1961acd819 100644 --- a/.github/scripts/release_notes/android-release.js +++ b/.github/scripts/release_notes/android-release.js @@ -22,7 +22,7 @@ async function fetchMavenArtifactInfo(groupId, capacity, timestampInMilliseconds let options = { host: 'search.maven.org', port: 443, - timeout: 2000, + timeout: 5000, path: `/solrsearch/select?q=g:${groupId}&core=gav&rows=${capacity}&wt=json`, method: 'GET', headers: { @@ -159,7 +159,7 @@ function buildGitHubInfo(artifactId, artifactVersion) { case "signal": return { repoName: `aepsdk-${artifactId}-android`, - tagName: `${artifactVersion}-${artifactId}` + tagName: `v${artifactVersion}-${artifactId}` } case "edge": @@ -179,13 +179,15 @@ function buildGitHubInfo(artifactId, artifactVersion) { repoName: `aepsdk-${artifactId}-android`, tagName: `v${artifactVersion}` } - case "messaging": - case "campaignclassic": - case "campaign": - return { - repoName: `aepsdk-${artifactId}-android`, - tagName: artifactVersion - } + + // TODO: remove the following code after the tag name is updated + // case "messaging": + // case "campaignclassic": + // case "campaign": + // return { + // repoName: `aepsdk-${artifactId}-android`, + // tagName: artifactVersion + // } default: console.log("artifactId not supported: " + artifactId) return null diff --git a/.github/scripts/release_notes/github-release.js b/.github/scripts/release_notes/github-release.js index eb74ba3db3..8ce5f860d0 100644 --- a/.github/scripts/release_notes/github-release.js +++ b/.github/scripts/release_notes/github-release.js @@ -30,7 +30,7 @@ async function fetchReleaseInfo(token, owner, repo, capacity = 5) { let options = { host: 'api.github.com', port: 443, - timeout: 2000, + timeout: 5000, path: `/repos/${owner}/${repo}/releases?per_page=${capacity}`, method: 'GET', headers: { @@ -83,6 +83,7 @@ async function fetchReleaseInfoWithTagName(token, owner, repo, tag) { let options = { host: 'api.github.com', port: 443, + timeout: 5000, path: `/repos/${owner}/${repo}/releases/tags/${tag}`, method: 'GET', headers: { @@ -98,7 +99,7 @@ async function fetchReleaseInfoWithTagName(token, owner, repo, tag) { return new Promise((resolve) => { let reqGet = https.request(options, function (res) { if (res.statusCode != 200) { - throw new Error(`response statusCode: ${res.statusCode}`) + console.error(`Error: response statusCode: ${res.statusCode}, please check if the tag (${tag}) exists in Github repo.`) } console.log(`response statusCode: ${res.statusCode}`) @@ -116,6 +117,10 @@ async function fetchReleaseInfoWithTagName(token, owner, repo, tag) { console.error(e); throw new Error("Got error response.") }); + reqGet.on('timeout', function () { + reqGet.destroy() + throw new Error("Request timeout.") + }); reqGet.end(); }) diff --git a/.github/scripts/release_notes/index.js b/.github/scripts/release_notes/index.js index a920371ebc..37033d718f 100644 --- a/.github/scripts/release_notes/index.js +++ b/.github/scripts/release_notes/index.js @@ -29,12 +29,15 @@ async function run() { updateReleaseNotesPage("./src/pages/documentation/release-notes/index.md", sortedList) const ignoreList = ['AEP React Native', 'Roku', 'AEP Flutter'] for (const releaseInfo of sortedList) { + // We don't have separate release note pages for AEP React Native, Roku, and AEP Flutter if (ignoreList.includes(releaseInfo.platform)) { continue } let filePath = releaseNoteMap[releaseInfo.extension] if (filePath != undefined) { updateReleaseNotesPage(filePath, [releaseInfo]) + } else { + console.error(`Error: no release note page found for ${releaseInfo.extension}`) } } let jsonObj = { diff --git a/.github/scripts/release_notes/releaseNoteMap.json b/.github/scripts/release_notes/releaseNoteMap.json index dca7cd9ee4..d759746df2 100644 --- a/.github/scripts/release_notes/releaseNoteMap.json +++ b/.github/scripts/release_notes/releaseNoteMap.json @@ -3,19 +3,19 @@ "Lifecycle": "./src/pages/documentation/mobile-core/release-notes.md", "Identity": "./src/pages/documentation/mobile-core/release-notes.md", "Signal": "./src/pages/documentation/mobile-core/release-notes.md", + "Assurance": "./src/pages/documentation/platform-assurance-sdk/release-notes.md", "UserProfile": "./src/pages/documentation/profile/release-notes.md", - "Analytics": "./src/pages/documentation/adobe-analytics/release-notes.md", - "Campaign Standard": "./src/pages/documentation/adobe-campaign-standard/release-notes.md", - "Messaging": "./src/pages/documentation/adobe-journey-optimizer/release-notes.md", - "Target": "./src/pages/documentation/adobe-target/release-notes.md", "EdgeConsent": "./src/pages/documentation/consent-for-edge-network/release-notes.md", "Edge": "./src/pages/documentation/edge-network/release-notes.md", - "Places": "./src/pages/documentation/places/release-notes.md", - "Assurance": "./src/pages/documentation/platform-assurance-sdk/release-notes.md", - "Optimize": "./src/pages/documentation/adobe-journey-optimizer-decisioning/release-notes.md", - "Media": "./src/pages/documentation/adobe-media-analytics/release-notes.md", "EdgeIdentity": "./src/pages/documentation/identity-for-edge-network/release-notes.md", "EdgeMedia": "./src/pages/documentation/media-for-edge-network/release-notes.md", + "Messaging": "./src/pages/documentation/adobe-journey-optimizer/release-notes.md", + "Optimize": "./src/pages/documentation/adobe-journey-optimizer-decisioning/release-notes.md", + "Analytics": "./src/pages/documentation/adobe-analytics/release-notes.md", + "Target": "./src/pages/documentation/adobe-target/release-notes.md", + "Places": "./src/pages/documentation/places/release-notes.md", + "Media": "./src/pages/documentation/adobe-media-analytics/release-notes.md", "Audience": "./src/pages/documentation/adobe-audience-manager/release-notes.md", + "Campaign Standard": "./src/pages/documentation/adobe-campaign-standard/release-notes.md", "Campaign Classic": "./src/pages/documentation/adobe-campaign-classic/release-notes.md" } \ No newline at end of file diff --git a/.github/scripts/release_notes/update-release-notes.js b/.github/scripts/release_notes/update-release-notes.js index dda0ebc60f..33445cff29 100644 --- a/.github/scripts/release_notes/update-release-notes.js +++ b/.github/scripts/release_notes/update-release-notes.js @@ -179,13 +179,10 @@ async function updateReleaseNotesPage(filePath, releaseInfoArray) { // Read the contents of the markdown file. let contentLines = fs.readFileSync(filePath, "utf8").toString().split("\n") // Find the index of the release notes header. - let releaseNotesHeader = "# Release notes" + let releaseNotesHeader = "# Release Notes" let releaseNotesHeaderIndex = contentLines.indexOf(releaseNotesHeader) if (releaseNotesHeaderIndex == -1) { - releaseNotesHeaderIndex = contentLines.indexOf("# Release Notes") - } - if (releaseNotesHeaderIndex == -1) { - console.error("can't find the release notes header") + console.error("Error: can't find the release notes header") return } let contentIsChanged = false @@ -193,7 +190,7 @@ async function updateReleaseNotesPage(filePath, releaseInfoArray) { let title = generateReleaseTitle(releaseInfo.platform, releaseInfo.extension, releaseInfo.version) let titleLine = `### ${title}` if (hasLineStartWith(titleLine, contentLines)) { - console.error("already updated") + console.error(`Already updated: ${titleLine}`) continue } let dateStr = convertIOSDateToRleaseDateFormat(releaseInfo.published_at) diff --git a/src/pages/documentation/release-notes/index.md b/src/pages/documentation/release-notes/index.md index 19419dba1a..ef33472bf1 100644 --- a/src/pages/documentation/release-notes/index.md +++ b/src/pages/documentation/release-notes/index.md @@ -5,7 +5,7 @@ Keywords: - Release notes --- -# Release notes +# Release Notes ## September 26, 2023