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

Ignore local environment .tool-versions configuration file #4476

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jan 16, 2022

Related PRs

Description

The .tool-versions file configures one's local environment and should likely not be committed. Its format is defined by asdf-vm, and is similar to nvm, rvm, or rbenv. Ignoring this file will help ensure the configuration is not accidentally committed to the repository.

To test: n/a

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@dcalhoun dcalhoun marked this pull request as ready for review January 16, 2022 16:39
@dcalhoun dcalhoun requested a review from hypest January 16, 2022 16:40
@hypest
Copy link
Contributor

hypest commented Jan 17, 2022

👋 @dcalhoun ! I'm not familiar with asdf-vm and .tool-version in particular and I wonder, can you share some quick usage of it? Would that also help with testing/verifying this PR?

@dcalhoun
Copy link
Member Author

👋 @dcalhoun ! I'm not familiar with asdf-vm and .tool-version in particular and I wonder, can you share some quick usage of it? Would that also help with testing/verifying this PR?

@hypest asdf-vm is an alternative to version managers like nvm, n, rbenv, or rvm. asdf-vm seeks to provide a single tool for managing versions of various runtimes, rather than needing individual tools for each runtime. In the context of this project, .tool-versions serves as an alternative to .nvmrc, but this PR does not attempt to replace the current usage of .nvmrc.

echo "14.17.6" > .nvmrc
❯ nvm use
❯ node --version
v14.17.6

❯ echo "nodejs 14.17.6" > .tool-versions
❯ asdf current nodejs
nodejs          14.17.6         /Users/[REDACTED]/Sites/a8c/gutenberg/.tool-versions
❯ node --version
v14.17.6

I do not believe there are actionable testing steps for this PR, as it is not proposing any configuration change that impacts the project. The proposed changes relate to Git configuration and help avoid accidental erroneous commits of a tool that I happen to use on my development machine. I would compare the subject to the act of ignoring VSCode editor configuration files.

@hypest
Copy link
Contributor

hypest commented Jan 17, 2022

Gotcha, thanks for elaborating David!

I'll go ahead and LGTM the PRs.

.gitignore Show resolved Hide resolved
Copy link
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

LGTM David, only left a non blocking comment. Thanks!

The `.tool-versions` file configures one's local environment and should
likely not be committed. Its format is defined by
[asdf-vm](https://asdf-vm.com), and is similar to
[nvm](https://github.com/nvm-sh/nvm), [rvm](https://rvm.io), or
[rbenv](https://github.com/rbenv/rbenv). Ignore this file will help
ensure the configuration is not accidentally committed to the
repository.
Follow project practice by inserting empty line to end of file.
@dcalhoun dcalhoun force-pushed the chore/ignore-tool-version-configuration branch from 6797975 to e452e1d Compare January 17, 2022 17:59
@dcalhoun dcalhoun enabled auto-merge January 17, 2022 18:00
@peril-wordpress-mobile
Copy link

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@dcalhoun dcalhoun merged commit f26c2de into develop Jan 17, 2022
@dcalhoun dcalhoun deleted the chore/ignore-tool-version-configuration branch January 17, 2022 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants