Skip to content
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

Beautify apps commands #862

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Beautify apps commands #862

wants to merge 3 commits into from

Conversation

davlgd
Copy link
Contributor

@davlgd davlgd commented Dec 6, 2024

This PR tries to enhance the way information are printed to the user in application management, adding instructions/tips/link when useful. Feel free to test it, discuss choices made.

@davlgd davlgd self-assigned this Dec 6, 2024
@davlgd davlgd requested a review from a team as a code owner December 6, 2024 17:54
Copy link

github-actions bot commented Dec 6, 2024

🔎 A preview has been automatically published:

  • 🐧 linux 867e230556ac240381f8b52a589071afcd71cd2804e4d4dc10a632e9ac52907d
  • 🍏 macos 78857b401febbe7f2511289831d1a6a64acecec66e634e1fb7a9cd7425b05a03
  • 🪟 win 251982cf814cdf650c3596a72d074af5b2c17de7ce60c14e338c6a4bfacd4599

This preview will be deleted once this PR is closed.

@davlgd davlgd force-pushed the davlgd-beautify-apps branch from 19a6848 to 022b809 Compare December 19, 2024 12:20
@hsablonniere hsablonniere added this to the 3.12 milestone Jan 23, 2025
@davlgd davlgd force-pushed the davlgd-beautify-apps branch from 022b809 to 5f1d3cf Compare January 25, 2025 12:14
Copy link
Collaborator

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

Nice, it's really a better output :+1.
I only looked at the code and LGTM with just a few questions.

*/
export function isGitRepo () {
try {
childProcess.execSync('git rev-parse --is-inside-work-tree', {
Copy link
Collaborator

Choose a reason for hiding this comment

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

So we start assuming user has got git binary on its machine.

This is something we need to document. I feel like it is a breaking change right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made it as is, we can also check if git is here, if not, don't print anything related. But as the user need a git repo with commits, I think it's could be better to print a warning if no git is found.

I think we already tell in doc git is mandatory, but we can insist more on this.

.catch(async (e) => {
const isShallow = await git.isShallow();
if (isShallow) {
throw new Error('Failed to push your source code because your repository is shallow and therefore cannot be pushed to the Clever Cloud remote.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would be interested in the reason of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was there before. My point here was mainly to change how things are printed, not how the CLI works (except to add some info about git repo):

const isShallow = await git.isShallow();

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