-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose forge publish api (#811)
* feat: expose forge publish api * adds the --publish-targets to make command * remove console.log * adds a test for the publish arguments * default is not required * modification to not stub publish task
- Loading branch information
Showing
4 changed files
with
96 additions
and
2 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
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,28 @@ | ||
'use strict'; | ||
|
||
const chalk = require('chalk'); | ||
const Task = require('ember-cli/lib/models/task'); | ||
const { electronProjectPath } = require('../utils/build-paths'); | ||
const { api } = require('../utils/forge-core'); | ||
|
||
// | ||
// A task that runs electron-forge publish to publish artifacts. | ||
// | ||
class PublishTask extends Task { | ||
async run(options) { | ||
let { ui } = this; | ||
let { makeResults, publishTargets } = options; | ||
|
||
ui.writeLine(chalk.green('Publish Electron project.')); | ||
|
||
let publishOptions = { | ||
dir: electronProjectPath, | ||
makeResults, | ||
publishTargets, | ||
}; | ||
|
||
return await api.publish(publishOptions); | ||
} | ||
} | ||
|
||
module.exports = PublishTask; |
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