-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
122 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
'use strict'; | ||
const got = require('got'); | ||
const fetch = require('node-fetch'); | ||
|
||
module.exports = async function (channelType) { | ||
let HOST = process.env.EMBER_SOURCE_CHANNEL_URL_HOST || 'https://s3.amazonaws.com'; | ||
let PATH = 'builds.emberjs.com'; | ||
|
||
const result = await got(`${HOST}/${PATH}/${channelType}.json`, { json: true }); | ||
const response = await fetch(`${HOST}/${PATH}/${channelType}.json`); | ||
const result = await response.json(); | ||
|
||
return `${HOST}/${PATH}${result.body.assetPath}`; | ||
return `${HOST}/${PATH}${result.assetPath}`; | ||
}; |