Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Announcement: program to email commit logs to developers

Discussion in 'Editor & General Support' started by Thomas-Lund, Apr 3, 2008.

  1. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Driven by the need for our own team to get commit messages from the asset server, I ended up coding one myself.

    Always like to give and take. So as a thanks to letting us "in" on the Unity community and helping out, here it is!

    Attached is a zip with the binary build - ready to run - and a zip with the sources. Got to set up your own project to compile, but its a no brainer.

    Installation
    ------------

    - Unpack the zip file
    - Open config.properties and modify with your settings
    - Open runtime.properties and set the variable to =0. This resets the "last time run" date
    - Start the program by typing
    "java -jar UnityAssetServerCommitMailer.jar"

    (You obviously need java installed on the machine to run it)

    To make a permanent installation, you have to schedule the above command to run e.g. every 5 minutes.

    How it works
    ------------
    The program uses a postgresql jdbc connection to the asset server, and pulls out a list of commit messages since "last time the program ran".

    The time stamp for last run is saved in the file "runtime.properties", and is used for the next time the program runs.

    This means that only commit messages newer than "last time" are send.

    The email addresses to send to are fetched from the asset server too. The program takes all users who are enabled for the project, minus the admin user, and sends the commit log to those.

    Thats about it :)


    I hope you enjoy the program, and bug reports / feature requests are welcome :)


    /Thomas
     

    Attached Files:

  2. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Wow - slightly stumped that no one seems to be interested in this.

    Was a major turn off comming from SVN that there were no commit hooks in the Asset Server.

    But only 4 downloads and no replies!?!?! Hmmmm.
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I was impressed that you shared this with the community. I'm not sure how many Unity users are using the asset server, so your contribution is probably of greater interest to a fairly small portion of the user base. We're not currently using an asset server, but if we do I'll want to re-visit this post. Thanks...
     
  4. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Nice solution. Not using assets server though. :wink:
     
  5. D.Darko

    D.Darko

    Joined:
    Feb 1, 2008
    Posts:
    7
    Very, very cool! Thanks for posting it! We do use the asset server - and have already begun using it!

    Thanks again!
     
  6. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Thanks for the comments. Wonder what you use then for version control!

    @D.Darko - Super!!!

    Then it was not all for myself then :)

    If you have any bugs you run into or feature requests, then post away!!
     
  7. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Time machine :wink:
     
  8. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
  9. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hi Thomas,

    thanks a LOT for sharing this! I am using the Asset Server, but currently only on my own ;-) At a later point, however, I'll probably use this, because I think it's a very practical thing to have commit updates via e-mail.

    Grateful regards,
    Jashan
     
  10. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Ups!!!

    Found a bug that made the program send out to many mails due to using a sql.Date instead of sql.Timestamp when looking at last run time.
     

    Attached Files:

  11. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    I'm using git and Time Machine.
     
  12. hai_ok

    hai_ok

    Joined:
    Jun 20, 2007
    Posts:
    193
    Nice Work Thomas!

    I like what you've done with this!
     
  13. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Okie dokie - last update. For today ;-)

    New feature
    * writes out list of files in the commit as part of the email

    Only changes in Finder.java, but here is a complete set of files as usual

    /Thomas
     

    Attached Files:

  14. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Cool! Thanks for sharing this. It looks useful, but I'll probably have to modify it to either support multiple databases or just to automatically do all of them. Using some query like 'select * from all_databases__view'.

    Cheers,
    -Jon

    p.s. About your game on portals, the first thing that stood out is that it's much too large of a download at 11.4 MB. I'd shoot for getting that to under 3 MB, and even people complain about the download size on that small. It seems plenty of people visiting portals still have slow connections.
     
  15. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Hey Jon

    Suport for multiple databases is next on my internal list of todos. Just to let you know ;-)

    Regarding the game. You are totally right. Way to large at the moment.

    We are now starting to get a little contact to portals, so I should most likely remove that comment from the initial post.
     
  16. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    And here it is

    Single program to run through the asset server and send one mail per project.

    There is an exception list, so you can mark projects that should not be checked.

    Beware the change in the config.properties file, where you should remove the "database" entry and use this instead:

    # Projects in comma separated list that should NOT be checked for commit messages
    projectExceptionList=projectname1, projectname2


    This tool is now finished in my oppinion. If anyone has any ideas of what to add still, then buzz me. Else this will be the final release.
     

    Attached Files:

  17. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Rock on, I'll be checking it out when I'm back at the office on Monday. :)

    Cheers,
    -Jon
     
  18. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Bump - was poked today by VoxelBoy who could not find this post. So just wanted to get this on the scope for people again.

    Nothing has changed in so far. Been in use now here in our studio for the last years without any real problems. Only known issue is that it fails sending large commits (like the first big ones on import)

    /Thomas
     
  19. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    FYI Thomas helped me out by adding secure sendmail support. I wanted to send email via my Gmail SMTP server (I didnt have a mail server already installed on my linux box) and his magical fingers produced a new .jar binary to do just that!

    Note: You'll need to edit the config.properties document with the following:

    Code (csharp):
    1. #
    2. # Mail settings
    3. #
    4.  
    5. # Authentication needed to send?
    6. smtpAuth=true
    7.  
    8. # SMTP server
    9. smtpHost=smtp.gmail.com
    10. smtpTLS=true
    11. smtpPort=587
    12.  
    13. # Username and pwd for SMTP server account. Only required if smtpAuth = true
    14. smtpUsername=email@domain.com
    15. smtpPwd=emailPassword
    16.  
    17. # Email address used as sender address
    18. smtpMailFrom=email@domain.com
    19.  
    20. # Turn on debug messages on send
    21. smtpDebug=true
    22.  
    23. #
    24. # Asset server database settings
    25. #
    26.  
    27. # Asset server hostname and port
    28. dbServer=server.com
    29. dbPort=10733
    30.  
    31. # Username and password for database. This is your asset server admin account
    32. dbUsername=admin
    33. dbPwd=pass
    34.  
    35. # Projects in comma separated list that should NOT be checked for commit messages
    36. projectExceptionList=
    To run:
    java -jar UnityAssetServerCommitMailer.jar

    :)
     

    Attached Files:

  20. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    It worked for me for the long time, but after system reinstalling it doesn't anymore. :(
    Can't find out what's going wrong. I set variable in runtime.properties to 0, and after first run it mails all existing commits. But that's all, any further runs have no effect, as it should be if there is no new commits, but they are exist!

    runtime.properties contens is:
    #Fri Nov 30 16:51:30 MSK 2012
    _lastRun=1354279890145
     
  21. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Bump!
     
  22. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Anyone using this thing?
    Still have this problem.
     
  23. drigger

    drigger

    Joined:
    Jan 23, 2013
    Posts:
    8
    I just discovered this thread. This looks like just what I need.

    I will be downloading shortly.

    Thanks,

    Lynn

    Lynn Grant
    Cross Design Group LTD
     
  24. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Suddenly this thing stops working correctly, now it sends the same commits all the time. Timestamp in the runtime properties changes, but for some reason it sends the same letters again and again on each start. I can't figure out what happens, any ideas?