Skip to content

feat(deploy): push initial deployment to prod#158

Merged
lucab merged 2 commits intodenoland:mainfrom
lucab:lucab/cmd-deploy-initial-prod
Jun 13, 2023
Merged

feat(deploy): push initial deployment to prod#158
lucab merged 2 commits intodenoland:mainfrom
lucab:lucab/cmd-deploy-initial-prod

Conversation

@lucab
Copy link
Copy Markdown
Contributor

@lucab lucab commented Jun 9, 2023

This tweaks deploy behavior on empty projects, pushing the initial deployment to prod and telling the user about futher updates requiring --prod flag usage.
It also enhances the final status message in order to record which environment got updated (production or preview).

This tweaks `deploy` behavior on empty projects, pushing the initial
deployment to prod and telling the user about futher updates requiring
`--prod` flag usage.
It also enhances the final status message in order to record which
environment got updated (production or preview).
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 9, 2023

CLA assistant check
All committers have signed the CLA.


if (!project!.hasProductionDeployment) {
wait("").start().info(
"Empty project detected, automatically pushing initial deployment to production (use --prod for further updates).",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't make this assumption as there can be existing deployments in a project without productionDeployment being set. We need to rewrite this so that we first fetch deployments for a project and then check if deployments.is_empty()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, updated the logic that way.

@lucab lucab marked this pull request as ready for review June 13, 2023 09:59
Copy link
Copy Markdown
Contributor

@satyarohith satyarohith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lucab lucab merged commit aefeebf into denoland:main Jun 13, 2023
@lucab lucab deleted the lucab/cmd-deploy-initial-prod branch June 13, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants