Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13597 from electron/release-updates
build: Updates to the release process
- Loading branch information
Showing
4 changed files
with
84 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const GitHub = require('github') | ||
const github = new GitHub() | ||
|
||
if (process.argv.length < 3) { | ||
console.log('Usage: find-release version') | ||
process.exit(1) | ||
} | ||
|
||
const version = process.argv[2] | ||
|
||
async function findRelease () { | ||
github.authenticate({type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN}) | ||
let releases = await github.repos.getReleases({ | ||
owner: 'electron', | ||
repo: 'electron' | ||
}) | ||
let targetRelease = releases.data.find(release => { | ||
return release.tag_name === version | ||
}) | ||
let returnObject = {} | ||
|
||
if (targetRelease) { | ||
returnObject = { | ||
id: targetRelease.id, | ||
draft: targetRelease.draft, | ||
exists: true | ||
} | ||
} else { | ||
returnObject = { | ||
exists: false, | ||
draft: false | ||
} | ||
} | ||
console.log(JSON.stringify(returnObject)) | ||
} | ||
|
||
findRelease() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters