Giter Club home page Giter Club logo

Comments (8)

Denis535 avatar Denis535 commented on June 29, 2024

My repository contains a few pacakges with a different versions. So, a git tag cannot match all versions of my packages.

from openupm.

favoyang avatar favoyang commented on June 29, 2024

The rule should be fine with monorepo.

A monorepo example

com.denis535.addressables-source-generator 1.0.37
com.denis535....

For example, when handling the latest Git tag: 1.0.174 for com.denis535.addressables-source-generator, the current build pipeline will find that the package.json is still 1.0.37. And raise a build error with message E409 (the version already exists).

After this change, it will still fail, but with a new message: the Git tag version (1.0.174) doesn't matched with the package.json version 1.0.37, which is more clear.

BTW, to avoid these unnecessary failure builds, you are suggested to use gitTagPrefix in the package meta file to filter the Git tag for your package. It's one way to manage a monorepo.

from openupm.

Denis535 avatar Denis535 commented on June 29, 2024

Honestly, I didn't understand anything. I just want to publish my packages and not bother.
For example I have packages:

com.denis535.addressables-extensions v6.6.6
com.denis535.addressables-source-generator v7.7.7

But git tag v10.10.10. Now it works. And I'd like it to work further.

from openupm.

favoyang avatar favoyang commented on June 29, 2024

@Denis535 do you mean that as a monorepo, your Git tag (v10.10.10) has nothing to do with any package version ([email protected])?

from openupm.

Denis535 avatar Denis535 commented on June 29, 2024

has nothing to do with any package version

Yes.
I could update my packages with versions v1.2.3 and v.3.2.1 but commit with git tag v.7.7.7.

from openupm.

favoyang avatar favoyang commented on June 29, 2024

@Denis535 In such a case will the prefixed Git tag work for you?

i.e. when you're ready to publish [email protected], you manually create a Git tag: com.denis535.addressables-extensions/6.6.6. And OpenUPM can track the com.denis535.addressables-extensions/ prefix to find the right Git tags.

The problem with your current Git tag pattern is that it missing a connection for the Git tag and monorepo packages. It brings a little trouble when debugging a specific version, how to quickly find the Git tag for a specific versioned package.

Another completely different strategy is to align your package with your Git tag. i.e. when you create a new Git tag v7.7.7, for the packages you want to publish, you manually set their version to 7.7.7.

Both ways have pros and cons, prefixed Git tag is more popular in the OpenUPM community.

from openupm.

Denis535 avatar Denis535 commented on June 29, 2024

you manually create a Git tag: com.denis535.addressables-extensions/6.6.6

Maybe this is a good idea.
But all these little things take time to get into them. A lot of people might just give up.

from openupm.

favoyang avatar favoyang commented on June 29, 2024

But all these little things take time to get into them. A lot of people might just give up.

IMO, most monorepo on OpenUPM are already using the gitTagPrefix to filter Git tags. It's a feature that has been there for a long time.

If you want to follow this way, you don't need to migrate any existing Git tags, just start it with the next version. It's not a lot of work anyway.

from openupm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.