mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix asset fail workaround (#16680)
* fix asset fail workaround * uploadResponse.data.id => uploadResponse.id * asset_id => id
This commit is contained in:
@@ -30,10 +30,10 @@ function uploadToGitHub () {
|
||||
|
||||
github.repos.uploadAsset(githubOpts).then((uploadResponse) => {
|
||||
console.log(`Successfully uploaded ${fileName} to GitHub as ${fakeFileName}. Going for the rename now.`)
|
||||
return github.repos.updateAsset({
|
||||
return github.repos.editAsset({
|
||||
owner: 'electron',
|
||||
repo: 'electron',
|
||||
asset_id: uploadResponse.data.id,
|
||||
id: uploadResponse.data.id,
|
||||
name: fileName
|
||||
}).then(() => {
|
||||
console.log(`Successfully renamed ${fakeFileName} to ${fileName}. All done now.`)
|
||||
@@ -53,7 +53,7 @@ function uploadToGitHub () {
|
||||
existingAssets.map(existingAsset => github.repos.deleteAsset({
|
||||
owner: 'electron',
|
||||
repo: targetRepo,
|
||||
asset_id: existingAsset.id
|
||||
id: existingAsset.id
|
||||
}))
|
||||
).catch((deleteErr) => {
|
||||
console.log(`Failed to delete existing asset ${fileName}. Error was:`, deleteErr)
|
||||
|
||||
Reference in New Issue
Block a user