Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Feedback Accessing Lock state of a Package via script

Discussion in 'Package Manager' started by pojoih, Sep 29, 2020.

  1. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    193
    I recently tried to build a system to manually trigger an update of our custom git packages via an Editor Script and found out there isn't an easy way to change the lock state of a specific git package unless parsing the packages-lock.json by myself.
    It would be cool to include the lockstate inside the PackageInfo or GitInfo class and get some functions like SetHash oder simply Update to fetch the newest Tag/Version of a package.
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    150
    Hi @pojoih,

    The ability to update to the newest revision of a Git package is on our roadmap but we are still working on the technical details. In the meantime, parsing the packages-lock.json file is probably the only way to do this from a script.

    Sam
     
unityunity