Solved Automatic Updates

Discussion in 'Plugin Development' started by SpencerHilt, Apr 24, 2016.

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

    SpencerHilt

    Hey!

    I am having trouble figuring out how to create automatic updates for my Bukkit plugin. It's only for my server, so I would prefer to use github. How would I check for updates on my plugin every time the plugin enables, and then download it if there is an update available. I like this, but, I need it to go to a custom url, and download the source and compile it. I am running Centos 7 on my VPS.
    Thanks in advance!
     
  2. Offline

    SpencerHilt

    Cool, but I need it to download the update too.
     
  3. Online

    timtower Administrator Administrator Moderator

  4. Offline

    SpencerHilt

    @timtower

    Thanks, but I store my code in a github repository, how would I get the code from that and compile it, and then save it to my plugins folder.

    Thanks!
     
  5. Online

    timtower Administrator Administrator Moderator

    @SpencerHilt Just compile and put the jar on github?
    Or get a jenkins server that compiles it for you.
     
  6. Offline

    SpencerHilt

    Ok! That download link you gave me returns an error.
    Syntax error on token "getChannel", Identifier expected after this token
     
  7. Online

    timtower Administrator Administrator Moderator

    @SpencerHilt You do realize that there are ~10 solutions there right?
     
  8. Offline

    mythbusterma

    @SpencerHilt

    Remember, basic Java skills are a requirement for making a plugin, not a recommendation.

    Assuming you're being serious about compiling it on the server (demonstrably the wrong way of doing it).

    You'd have to run javac and jar on your sever, after cloning the repo using git. So it would probably be platform specific in implementation.

    Alternatively, you can find a Java implementation of the Git protocol and clone it within your plugin, then compile it by hooking into the compiler tool-chain (probably above your level if you don't understand why this is a bad idea).

    The way this is actually done is by using a system like Maven, or, barring that, just upload a jarfile with a specific name to the repo that has already been compiled.
     
    timtower and SpencerHilt like this.
  9. Offline

    A5H73Y

  10. Online

    timtower Administrator Administrator Moderator

Thread Status:
Not open for further replies.

Share This Page