renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.13k stars 2.23k forks source link

Support for Unity editor #27295

Open secustor opened 7 months ago

secustor commented 7 months ago

Discussed in https://github.com/renovatebot/renovate/discussions/27219

Originally posted by **ViMaSter** February 11, 2024 ### Tell us more. #19300 mentioned using Renovate with the Unity game engine, however, that post was focused on packages used inside Unity projects, not the Unity editor itself. Unity uses a simple `ProjectVersion.txt` file for managing editor versions and has RSS feeds for all release streams (beta, stable, LTS) that follow the same structure. - ProjectVersion.txt in question: https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/GraphicsSamples/HDRPSamples/ProjectSettings/ProjectVersion.txt - RSS feeds: - beta releases: https://unity.com/releases/editor/beta/latest.xml - stable releases: https://unity.com/releases/editor/releases.xml - lts releases: https://unity.com/releases/editor/lts-releases.xml I have already [built the manager](https://github.com/ViMaSter/renovate/pull/1) for one of the games I'm working on, so I'd be happy to integrate it back upstream. Would this be something worth integrating or better solved via a custom fork? Speaking from personal experience, with CI/CD gaining more and more traction in game development, having an automated dependency check for various game engines would be super useful to me.
secustor commented 7 months ago

I've only seen this questionnaire posted inside GitHub issues, so if you want me to create a separate issue instead of keeping it inside discussions, let me know!


New package manager questionnaire

Did you read our documentation on adding a package manager?

Basics

What's the name of the package manager?

Unity3D

What language(s) does this package manager support?

Not really applicable.
Unity supports C#, but this manager only handles which version of the Unity Editor and runtime is associated with a project (similarly to updating Node.js via the nvm provider).

How popular is this package manager?

According to SteamDB

Does this language have other (competing?) package managers?

What are the big selling points for this package manager?

Detecting package files

What kind of package files, and names, does this package manager use?

[^/]ProjectSettings/ProjectVersion.txt

Which fileMatch pattern(s) should Renovate use?

[^/]ProjectSettings/ProjectVersion.txt

Do many users need to extend the fileMatch pattern for custom file names?

Is the fileMatch pattern going to get many "false hits" for files that have nothing to do with package management?

Unlikely, given the need for a ProjectSettings directory containing ProjectVersion.txt, both are case-sensitive.

Parsing and Extraction

Can package files have "local" links to each other that need to be resolved?

No.

Package file parsing method

The package files should be:

Which format/syntax does the package file use?

How should we parse the package files?

Does the package file have different "types" of dependencies?

List all the sources/syntaxes of dependencies that can be extracted

Only the one listed inside Which format/syntax does the package file use?.

Describe which types of dependencies above are supported and which will be implemented in future

Only the one listed inside Which format/syntax does the package file use?.

Versioning

What versioning scheme does the package file(s) use?

A Unity version consists of

Example:

Reference: Official Unity documentation (see headline Unity version numbers)

Does this versioning scheme support range constraints, like ^1.0.0 or 1.x?

Lookup

Is a new datasource required?

Will users want (or need to) set a custom host or custom registry for Renovate's lookup?

Where can Renovate find the custom host/registry?

Are there any constraints in the package files that Renovate should use in the lookup procedure?

Will users need the ability to configure language or other constraints using Renovate config?

Artifacts

Does the package manager use a lock file or checksum file?

Is the locksum or checksum mandatory?

If lockfiles or checksums are used: what tool and exact commands should Renovate use to update one (or more) package versions in a dependency file?

The hash is pre-determined by Unity and can be fetched at the same time as available versions.

Package manager cache

Does the package manager use a cache?

If the package manager uses a cache, how can Renovate control the cache?

Should Renovate keep a cache?

Generating a lockfile from scratch

Renovate can perform "lock file maintenance" by getting the package manager to generate a lockfile from scratch. Can the package manager generate a lockfile from scratch?

Other

What else should we know about this package manager?

This manager, is aimed at updating the Unity Editor itself, not the packages inside a game project.

Packages inside Unity projects might already be updatable by Renovate, using the npm provider (see #19300), but I've personally not yet used it.