Search Unity

Updating custom git package

Discussion in 'Package Manager' started by Stranger-Games, Jan 1, 2021.

  1. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Hi,

    I have created my custom package added it to git and added the git url to another project and things are working great.

    Now I updated my package, updated the version number in package.json, and then pushed again.

    However in the other project there's no update. I have to remove and readd the git url to get the updated package.
    Is there a way to make unity detect the update and offer update automatically?

    Thank you for advance.
     
  2. _slash_

    _slash_

    Joined:
    Mar 26, 2013
    Posts:
    37
    I don't think so, it's using a package registry system under the hood.

    So you need to use a package server that handles dependencies, versioning, etc...
    You can: publish it to NPM (public or paid privately), Verdaccio (own server), and maybe using the package feature of your git host, here for GitHub or Gitlab here

    We use Verdaccio locally and Gitlab private repositories for version control.
     
    Stranger-Games likes this.
  3. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    @_slash_

    Thank you very much for the useful information.
     
  4. _slash_

    _slash_

    Joined:
    Mar 26, 2013
    Posts:
    37
    c8theino and Stranger-Games like this.
  5. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    @_slash_
    UpmGitExtension seems to work pretty well. Thank you very much!