Fix for getting a bad archive for releases

This commit is contained in:
Greg 2021-08-24 16:44:06 -06:00
parent 479a3d9ee2
commit 671de68fa2
2 changed files with 3 additions and 3 deletions

View File

@ -64,11 +64,11 @@ const getLatestReleaseZipUrl = async ( owner, repository, getPrerelease = false,
// Loop until we find the first pre-release, then return it.
body.forEach(release => {
if ( release.prerelease ) {
resolve( release.zipball_url );
resolve( release.assets[0].browser_download_url );
}
});
} else {
resolve( body.zipball_url );
resolve( body.assets[0].browser_download_url );
}
}
})

View File

@ -24,7 +24,7 @@ utils.describeIf( UPDATE_WC )( 'WooCommerce plugin can be uploaded and activated
beforeAll( async () => {
if ( TEST_RELEASE ) {
zipUrl = await getLatestReleaseZipUrl('woocommerce', 'woocommerce');
zipUrl = await getLatestReleaseZipUrl( 'woocommerce', 'woocommerce' );
} else {
zipUrl = 'https://github.com/woocommerce/woocommerce/releases/download/nightly/woocommerce-trunk-nightly.zip';
}