Bukkit Updater [Python Server Updater with Build Numbers]

Discussion in 'Bukkit Tools' started by T_Mac, Jan 22, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    T_Mac

    BukkitUp 1.0

    Just a simple python script I whipped up to update CraftBukkit.

    Features:
    1. Uses the craftbukkit build rss feed to determine if new versions are available.
    2. Can specify how often to update eg. Update every 15 builds
    3. Keeps up with build numbers so you don't have to
    Yet to be implemented:

    1. Specify specific builds to install
    2. Only Update every x hours/days
    3. Build Rollback system
    Installation:

    1. Download python at http://python.org/
    2. Download This Module
      1. unzip file
      2. at a prompt run: setup.py install
        • for linux: python setup.py install
    3. Download Latest Release ..... place anywhere (Windows Build)
    4. at prompt run: bukkitup.py
      • for linux: python bukkitup.py
    5. a bukkitup.cfg file will be generated, edit it to setup the script
      • sample config : here
      • sample config auto updates every new build
    6. run the script again to use
    Config File:

    • updateevery - update after this many builds past installed version
    • pathtobukkit - the path to craftbukkit.jar
      • can be relative to script location or absolute
      • leave as is for current directory
      • leave off quotes for paths with spaces, the script takes care of it
    • autoupdate - Update craftbukkit or just check for new version
    • currentbuild - build number of installed craftbukkit
      • by default 0 you can change itif you already know or leave it and it will be updated after first update
     
  2. Offline

    Mike24

    Hey this is awesome! but how do i install it and use it?[​IMG]
     
  3. Offline

    T_Mac

    updates first post with more detailed install info
     
  4. Offline

    civ77

    which python version does this use? 2 or 3?
     
  5. Offline

    T_Mac

    I wrote it for python 2.4 because that is what centos had but it should work on anything up to 2.7
     
  6. Offline

    Fugensnot

    Can we have an example of what the config file should look like? I'm not sure if I'm using the right syntax for the path to craftbukkit.

    EDIT: Figured it out, but now I'm getting an error I think...
    [​IMG]
     
  7. Offline

    T_Mac

    added windows versions to first post along with sample config
     
  8. Offline

    MightyMouse

    I am getting an error when I run the script, any thoughts? Win7 64bit


    bukkitupwin.jpg
     
  9. Offline

    T_Mac

    Since this was last I updated in February, the rss address has changed, that is what is throwing the error. This script really isn't needed since the introduction of recommended builds, however I can update it if you want. You should check my other script Handle, the next version will include automatic updates.
     
  10. Offline

    JWhy

    Nope:
     
  11. Offline

    T_Mac

    What version of python do you have? Also you got a different error than mighty did I know my code inside the at.
     
  12. Offline

    JWhy

    on CentOS5
     
  13. Offline

    MightyMouse

    thanks for the update, T Mac..... since i run Windows 7, and Handle is Linux only, i would like it if you updated this script. Thanks.
     
  14. Offline

    T_Mac

    I update the windows build for you
    Don't know how i missed it but the windows build doesn't run on linux
     
  15. Offline

    JWhy

    Uuh, I used the nonwin build
     
  16. Offline

    MightyMouse

    awesome, thanks T Mac
     
  17. Offline

    T_Mac

    Make sure you have the most recent version, that line 29 doesn't even exist anymore
     
  18. Offline

    JWhy

    Okay works now
    THX!
     
  19. Offline

    MightyMouse

    I now get the following


    Code:
    E:\games\Minecraft\MinecraftServer>bukkitupwin.py
    Checking for update...
    Latest Build: 867
    Installed Build: 0
    Update Interval Reached
    Auto Update: True
    Starting Update
    Downloading File...
    Traceback (most recent call last):
      File "E:\games\Minecraft\MinecraftServer\bukkitupwin.py", line 88, in <module>
    
        update()
      File "E:\games\Minecraft\MinecraftServer\bukkitupwin.py", line 57, in update
        urllib.urlretrieve(url,'craftbukkit.jar')
      File "C:\Python27\lib\urllib.py", line 91, in urlretrieve
        return _urlopener.retrieve(url, filename, reporthook, data)
      File "C:\Python27\lib\urllib.py", line 237, in retrieve
        fp = self.open(url, data)
      File "C:\Python27\lib\urllib.py", line 205, in open
        return getattr(self, name)(url)
      File "C:\Python27\lib\urllib.py", line 342, in open_http
        h.endheaders(data)
      File "C:\Python27\lib\httplib.py", line 937, in endheaders
        self._send_output(message_body)
      File "C:\Python27\lib\httplib.py", line 797, in _send_output
        self.send(msg)
      File "C:\Python27\lib\httplib.py", line 759, in send
        self.connect()
      File "C:\Python27\lib\httplib.py", line 740, in connect
        self.timeout, self.source_address)
      File "C:\Python27\lib\socket.py", line 571, in create_connection
        raise err
    IOError: [Errno socket error] [Errno 10060] A connection attempt failed because
    the connected party did not properly respond after a period of time, or establis
    hed connection failed because connected host has failed to respond
    
     
  20. Offline

    MightyMouse

    i want to update you on this.... it does download something now, but the file is only 300k in size.
     
  21. Offline

    SteveMcGrath

    Hey guys. you may wana look at baskit as well. one of the main features of the tool is that it handles cb builds quite well. I have been using it for some time now w/o issues. THere isnt a windows version quite yet however its supposed to be "soon"
     
  22. Offline

    T_Mac

    Sorry mighty, for some reason I haven't been notified of your post, but it should be a simple fix. I'm at wok at the moment, but it should be fixed by 5 cst
     
  23. Offline

    T_Mac

    It should be fixed now
     
  24. Offline

    MightyMouse

    works great now, thanks T Mac!!!!!!!!!!!!!
     
  25. Offline

    Mrmaxmeier

    i get this error:
    BukkitServer/bukkitup.py
    Getting Latest Version.....
    Traceback (most recent call last):
    File "/Users/forix/Dropbox/BukkitServer/bukkitup.py", line 268, in <module>
    updatecheck(config)
    File "/Users/forix/Dropbox/BukkitServer/bukkitup.py", line 87, in updatecheck
    config['curbuild'] = getversion()
    File "/Users/forix/Dropbox/BukkitServer/bukkitup.py", line 15, in getversion
    step = bukkit.entries[0].link[-4:]
    IndexError: list index out of range
     
  26. Offline

    Bertware

    This is from 22/01/2011.
    Bukkit changed from Jenkins to dl.bukkit, causing all old download tools to break.

    Without the dev numbers, but downloads latest version:
    Buk'kit
    It's a tool I wrote, can download latest dev, latest recommended and generate .bat.
     
Thread Status:
Not open for further replies.

Share This Page