Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
remove heroku code for old updater
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored and zeke committed Aug 2, 2018
1 parent 2ca782a commit a69c3b6
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions script/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ const token = process.env.ELECTRON_API_DEMO_GITHUB_TOKEN
const version = require('../package').version

checkToken()
.then(checkHerokuLoginStatus)
.then(zipAssets)
.then(createRelease)
.then(uploadAssets)
.then(publishRelease)
.then(deployToHeroku)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
Expand All @@ -29,20 +27,6 @@ function checkToken () {
}
}

function checkHerokuLoginStatus () {
return new Promise((resolve, reject) => {
console.log('Checking Heroku login status')

childProcess.exec('heroku whoami', (error, stdout, stderr) => {
if (error) {
reject('You are not logged in to GitHub\'s Heroku Enterprise account. To log in, run this command:\n$ heroku login --sso')
} else {
resolve()
}
})
})
}

function zipAsset (asset) {
return new Promise((resolve, reject) => {
const assetBase = path.basename(asset.path)
Expand Down Expand Up @@ -188,25 +172,3 @@ function publishRelease (release) {
})
})
}

function deployToHeroku () {
return new Promise((resolve, reject) => {
console.log('Deploying to heroku')

const herokuCommand = [
'heroku',
'config:set',
'-a',
'github-electron-api-demos',
`ELECTRON_LATEST_RELEASE=${version}`
].join(' ')

childProcess.exec(herokuCommand, (error) => {
if (error) {
reject(error)
} else {
resolve()
}
})
})
}

0 comments on commit a69c3b6

Please sign in to comment.