Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Asset server revision

Discussion in 'Scripting' started by pgbrandao, Feb 22, 2010.

  1. pgbrandao

    pgbrandao

    Joined:
    Jul 28, 2009
    Posts:
    15
    Hi all!

    I'm writing a script to automate the build process (using BuildPipeline), and thought it would be handy to have a build history of key revisions in the asset server. The idea is each revision is stored separately in its own folder.

    In order to do this, I need a way to get the current version in the asset server through scripting, so it can create the respective folders. I've looked at the scripting reference and couldn't find anything. Does anyone know how I can do this?

    Thanks!
    Pedro.
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    This is currently not possible, but a feature request has been logged.
     
  3. raypendergraph

    raypendergraph

    Joined:
    Sep 8, 2009
    Posts:
    12
    I realize this thread is really old but for other searchers out there...

    asset server is just postgres so we have a script that is in the crontab (on a mac) that checks the build revision every hour to see if there is a build with the latest revision number. The way we do this is:

    Code (csharp):
    1. psql -h server.hostname.com -p myPort -U myUsername -d myDatabase -c "select 'revision',max(serial) as serial from changeset;" | grep revision | cut -c15-
    and store the result in a variable. Actually there are lots of interesting things you can do with this if you open the connection in SQuirreL and browse around. Make sure you don't commit anything though or you are hosed.
     
    Last edited: Feb 18, 2011
  4. Matt_001

    Matt_001

    Joined:
    Sep 17, 2010
    Posts:
    101
    I just read again the Unity 3.2 features/bug fixes, and it is now possible to do so.

    "It is now possible to update Asset Server project to specific revision through command line."

    I'm looking into it and I still don't find how to do so and what are the parameters!

    Anyone can help? I've looked there but it doesn't seems up to date.
     
    Last edited: Feb 22, 2011
  5. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    414
    Sorry for that guys, I have updated the docs, it will show up with the next push. Usage:
    Code (csharp):
    1. Unity.exe -assetServerUpdate IP:[port] projectName username password [r <revision>]
     
  6. Matt_001

    Matt_001

    Joined:
    Sep 17, 2010
    Posts:
    101
    Thanks a lot :D
     
unityunity