chore: add extra logging to the upload script

This commit is contained in:
Samuel Attard 2018-10-05 09:24:19 +10:00
parent 21348b9f3d
commit baf40fd8f7
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E

View file

@ -35,6 +35,9 @@ function uploadToGitHub () {
retry++ retry++
github.repos.getRelease(githubOpts).then(release => { github.repos.getRelease(githubOpts).then(release => {
const existingAssets = release.data.assets.filter(asset => asset.name === fileName) const existingAssets = release.data.assets.filter(asset => asset.name === fileName)
console.log('There are', release.data.assets.length, 'existing releases')
console.log(JSON.stringify(release.data.assets))
console.log(githubOpts)
if (existingAssets.length > 0) { if (existingAssets.length > 0) {
console.log(`${fileName} already exists; will delete before retrying upload.`) console.log(`${fileName} already exists; will delete before retrying upload.`)
github.repos.deleteAsset({ github.repos.deleteAsset({