diff --git a/.github/workflow-scripts/__tests__/verifyArtifactsAreOnMaven-test.js b/.github/workflow-scripts/__tests__/verifyArtifactsAreOnMaven-test.js index df1a332ac22..e77e7c4e2e4 100644 --- a/.github/workflow-scripts/__tests__/verifyArtifactsAreOnMaven-test.js +++ b/.github/workflow-scripts/__tests__/verifyArtifactsAreOnMaven-test.js @@ -38,7 +38,7 @@ describe('#verifyArtifactsAreOnMaven', () => { expect(mockSleep).toHaveBeenCalledTimes(1); expect(mockFetch).toHaveBeenCalledWith( - 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1', + 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom', ); }); @@ -55,7 +55,7 @@ describe('#verifyArtifactsAreOnMaven', () => { expect(mockSleep).toHaveBeenCalledTimes(1); expect(mockFetch).toHaveBeenCalledWith( - 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1', + 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom', ); }); @@ -67,7 +67,7 @@ describe('#verifyArtifactsAreOnMaven', () => { expect(mockSleep).toHaveBeenCalledTimes(0); expect(mockFetch).toHaveBeenCalledWith( - 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1', + 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom', ); }); @@ -81,7 +81,7 @@ describe('#verifyArtifactsAreOnMaven', () => { expect(mockSleep).toHaveBeenCalledTimes(90); expect(mockExit).toHaveBeenCalledWith(1); expect(mockFetch).toHaveBeenCalledWith( - 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1', + 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom', ); }); }); diff --git a/.github/workflow-scripts/verifyArtifactsAreOnMaven.js b/.github/workflow-scripts/verifyArtifactsAreOnMaven.js index d2091b00cde..1bb46163e0a 100644 --- a/.github/workflow-scripts/verifyArtifactsAreOnMaven.js +++ b/.github/workflow-scripts/verifyArtifactsAreOnMaven.js @@ -13,13 +13,14 @@ const SLEEP_S = 60; // 1 minute const MAX_RETRIES = 90; // 90 attempts. Waiting between attempt: 1 min. Total time: 90 min. const ARTIFACT_URL = 'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/'; +const ARTIFACT_NAME = 'react-native-artifacts-'; async function verifyArtifactsAreOnMaven(version, retries = MAX_RETRIES) { if (version.startsWith('v')) { version = version.substring(1); } - const artifactUrl = `${ARTIFACT_URL}${version}`; + const artifactUrl = `${ARTIFACT_URL}${version}/${ARTIFACT_NAME}${version}.pom`; for (let currentAttempt = 1; currentAttempt <= retries; currentAttempt++) { const response = await fetch(artifactUrl);