-
Notifications
You must be signed in to change notification settings - Fork 943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return version in hosting:channel:deploy
#3157
Changes from 7 commits
b2ef2fc
f6e4369
e35c14e
2c01878
2a820c1
08c9753
c8973b2
c7af889
88611af
dbca449
ef08fd1
30af7a9
cab8aea
00d1731
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -107,8 +107,11 @@ var deploy = function (targetNames, options, customContext = {}) { | |||||
_.each(context.hosting.deploys, function (deploy) { | ||||||
logger.info(clc.bold("Hosting URL:"), utils.addSubdomain(api.hostingOrigin, deploy.site)); | ||||||
}); | ||||||
const versionNames = context.hosting.deploys.map((deploy) => deploy.version); | ||||||
return { hosting: versionNames.length === 1 ? versionNames[0] : versionNames }; | ||||||
var siteDetails = {}; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had |
||||||
context.hosting.deploys.forEach((deploy) => { | ||||||
siteDetails[deploy.site] = { release: deploy.release }; | ||||||
}); | ||||||
return { hosting: siteDetails }; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change may also have an effect on the output of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks compatible. The only new field is Before:
After:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes sense to me because before this PR the return value of |
||||||
} | ||||||
}); | ||||||
}; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My TS-brain is rusty: could this be
const results: DeployResult = await deploy()
rather than usingas
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method
deploy()
returnsany
since it is implemented in js. Without theas
cast, eslint issues this warning:Unsafe assignment of an any value.
.I'm fine with either construct. Please advise.