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

feat(manager/asdf): add support for .tools-versions as used by asdf #17166

Merged
merged 28 commits into from
Sep 19, 2022

Conversation

sawilde
Copy link
Contributor

@sawilde sawilde commented Aug 14, 2022

Context

Basic support for managing nodejs versions as seen in .tools-versions files that is used by asdf

  • I couldn't find any support for asdf

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Aug 14, 2022

CLA assistant check
All committers have signed the CLA.

@sawilde sawilde changed the title Adding support for .tools-versions as used by asdf feat (manage/asdf): Adding support for .tools-versions as used by asdf Aug 14, 2022
@sawilde sawilde changed the title feat (manage/asdf): Adding support for .tools-versions as used by asdf feat (manage/asdf): add support for .tools-versions as used by asdf Aug 14, 2022
.gitignore Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
@sawilde sawilde force-pushed the feat/asdf-support branch from e3003e9 to 394b131 Compare August 14, 2022 04:55
@rarkins rarkins changed the title feat (manage/asdf): add support for .tools-versions as used by asdf feat(manager/asdf): add support for .tools-versions as used by asdf Aug 14, 2022
@sawilde sawilde requested a review from viceice August 14, 2022 06:34
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

thinking if we should name this manager tools-versions instead, as maybe other tools are using the same file in future. so we are more generic here.

@rarkins WDYT?

lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
@sawilde
Copy link
Contributor Author

sawilde commented Aug 18, 2022

thinking if we should name this manager tools-versions instead, as maybe other tools are using the same file in future. so we are more generic here.

@rarkins WDYT?

@viceice I didn't know other tools used the .tools-versions files I thought it was just an asdf thing

@sawilde sawilde requested a review from viceice August 19, 2022 23:40
@sawilde
Copy link
Contributor Author

sawilde commented Aug 20, 2022

I'd like to extend this to support other tooling that asdf can manage that is also supported by renovate. However I only use it for node and yarn so I would be looking for guidance on how to add support for the following

A few may make it (this is a just a first glance at potential candidate) and then leave additional support for those that need it to implement.

python
ruby
terraform

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

I still think we should rename this manager to tools-versions, as the processed filename is pretty generic, and maybe other tools will use the same file.

@rarkins @JamieMagee WDYT?

@sawilde
Copy link
Contributor Author

sawilde commented Aug 24, 2022

as the processed filename is pretty generic, and maybe other tools will use the same file.

but would they use it in the same way? If two tools used the same file but in a different manner then a single manager would struggle to maintain the file for all uses. I believe (because I have never tried to) we can control the managers being used from the renovate.config so then the repo owner can choose the correct manager for the file?

@rarkins
Copy link
Collaborator

rarkins commented Aug 24, 2022

It seems unlikely that another tool would adopt an incompatibility .tools-versions format so I think we can keep this as asdf, which users will expect

@sawilde
Copy link
Contributor Author

sawilde commented Aug 29, 2022

What do we need to do next?

lib/modules/manager/asdf/readme.md Outdated Show resolved Hide resolved
@rarkins rarkins requested a review from viceice August 30, 2022 04:08
rarkins
rarkins previously approved these changes Aug 30, 2022
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
@sawilde sawilde requested review from rarkins and viceice and removed request for rarkins September 4, 2022 02:53
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/asdf/extract.ts Outdated Show resolved Hide resolved
@sawilde sawilde requested a review from viceice September 8, 2022 08:02
@viceice viceice enabled auto-merge (squash) September 17, 2022 08:59
@viceice viceice merged commit c978b4e into renovatebot:main Sep 19, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.199.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@multani
Copy link
Contributor

multani commented Sep 20, 2022

@sawilde I'm just seeing the content of this PR now; it seems the asdf filename is .tool-versions, not .tools-versions, according to https://asdf-vm.com/manage/configuration.html:

image

@sawilde
Copy link
Contributor Author

sawilde commented Sep 20, 2022

@sawilde I'm just seeing the content of this PR now; it seems the asdf filename is .tool-versions, not .tools-versions, according to https://asdf-vm.com/manage/configuration.html:

Thanks for the spot, what a stupid typo by me - too busy concentrating on parsing the file and missed the little, yet important thing.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants