diff --git a/GitForWindowsHelper/component-updates.js b/GitForWindowsHelper/component-updates.js index 46256e9..05c6cb7 100644 --- a/GitForWindowsHelper/component-updates.js +++ b/GitForWindowsHelper/component-updates.js @@ -143,7 +143,7 @@ const guessReleaseNotes = async (context, issue) => { } } -const pacmanRepositoryBaseURL = 'https://wingit.blob.core.windows.net/' +const pacmanRepositoryBaseURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/' const pacmanRepositoryURLs = (package_name, version, architectures) => architectures.map(arch => { @@ -151,7 +151,7 @@ const pacmanRepositoryURLs = (package_name, version, architectures) => ? `${package_name}-${version}-1-${arch}.pkg.tar.xz` : `${package_name.replace(/^mingw-w64/, `$&-${arch === 'aarch64' ? `clang-${arch}` : arch}`)}-${version}-1-any.pkg.tar.xz` - return `${pacmanRepositoryBaseURL}${arch.replace(/_/g, '-')}/${fileName}` + return `${pacmanRepositoryBaseURL}${arch}/${fileName}` }) const getMissingDeployments = async (package_name, version) => { diff --git a/__tests__/component-updates.test.js b/__tests__/component-updates.test.js index d704695..b05b342 100644 --- a/__tests__/component-updates.test.js +++ b/__tests__/component-updates.test.js @@ -83,13 +83,13 @@ href="20230616162552.879387-1-corinna-cygwin@cygwin.com/">cygwin 3.4.7-1 [... even more stuff...]` } -const missingURL = 'https://wingit.blob.core.windows.net/x86-64/curl-8.1.2-1-x86_64.pkg.tar.xz' -const missingAarch64URL = 'https://wingit.blob.core.windows.net/aarch64/mingw-w64-clang-aarch64-curl-8.1.2-1-any.pkg.tar.xz' -const missingMinTTYURL = 'https://wingit.blob.core.windows.net/i686/mintty-1~3.6.5-1-i686.pkg.tar.xz' -const bogus32BitMSYS2RuntimeURL = 'https://wingit.blob.core.windows.net/i686/msys2-runtime-3.4.9-1-i686.pkg.tar.xz' -const bogus64BitMSYS2RuntimeURL = 'https://wingit.blob.core.windows.net/x86-64/msys2-runtime-3.3-3.3.7-1-x86_64.pkg.tar.xz' -const missingOpenSSHURL = 'https://wingit.blob.core.windows.net/i686/openssh-9.5p1-1-i686.pkg.tar.xz' -const missingBashURL = 'https://wingit.blob.core.windows.net/x86-64/bash-5.2.020-1-x86_64.pkg.tar.xz' +const missingURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/curl-8.1.2-1-x86_64.pkg.tar.xz' +const missingAarch64URL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/aarch64/mingw-w64-clang-aarch64-curl-8.1.2-1-any.pkg.tar.xz' +const missingMinTTYURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/mintty-1~3.6.5-1-i686.pkg.tar.xz' +const bogus32BitMSYS2RuntimeURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/msys2-runtime-3.4.9-1-i686.pkg.tar.xz' +const bogus64BitMSYS2RuntimeURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/msys2-runtime-3.3-3.3.7-1-x86_64.pkg.tar.xz' +const missingOpenSSHURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/openssh-9.5p1-1-i686.pkg.tar.xz' +const missingBashURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/bash-5.2.020-1-x86_64.pkg.tar.xz' const mockDoesURLReturn404 = jest.fn(url => [ missingURL, missingAarch64URL, diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 92de31b..ae6eb52 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -731,7 +731,7 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`) expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686']) }) -const missingURL = 'https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz' +const missingURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz' const mockDoesURLReturn404 = jest.fn(url => url === missingURL) jest.mock('../GitForWindowsHelper/https-request', () => { return { doesURLReturn404: mockDoesURLReturn404 } @@ -779,7 +779,7 @@ testIssueComment({ comment: '/add release note', note: 'missing deployment' }, { expect(context.res).toEqual({ body: `The following deployment(s) are missing: -* https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz`, +* https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz`, headers: undefined, status: 500 })