Fix for getting a bad archive for releases
This commit is contained in:
parent
479a3d9ee2
commit
671de68fa2
|
@ -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 );
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue