Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Suggestion for updater #73

Open
tomsterritt opened this issue Jul 17, 2012 · 11 comments
Open

Suggestion for updater #73

tomsterritt opened this issue Jul 17, 2012 · 11 comments
Milestone

Comments

@tomsterritt
Copy link
Member

(In case the forum topic was missed)

So I was thinking, seeing as phpVMS is hosted on github, we could get around the whole downloading a zip, uploading, etc etc etc.

How easy would it be to set up a "stable" branch of phpVMS on github, which the updater can pull a zip of and install itself?

(Also if it's not that easy, having a "stable" branch alone would be super handy as the master is not always error-free, and there aren't any historic downloads in the downloads tab on github)

@nabeelio
Copy link
Member

Where's the thread?

Setting up branch, etc is no big deal. The problem is the actual install itself. I've thought of doing this before, but hadn't had the time to research it. The problem ends up being the code to unzip/untar, extractions, permissions, etc. I think Wordpress has solved this problem, so someone needs to look at their code and just see the general way they've done it, or just research on ways to unzip/untar in place.

If someone wants to code this, I will participate and guide in the process. I can create a new branch for this and merge it into the mainline. Can you code? Do you want to take a crack at it? I will definitely help out, but I don't have the time to dedicate solely to this.

@tomsterritt
Copy link
Member Author

Sorry, thread is here: http://forum.phpvms.net/topic/7583-suggestion-for-auto-updater/

I can code but I'm not familiar with forking/keeping said fork up to date with master code, etc etc - I tried it the other day and failed epically.

I'm looking to make something that does this kind of thing with plugins so either way I'm going to have to figure it out :)

@nabeelio
Copy link
Member

Are you familiar with git at all? What you can do is this - don't work about branches and stuff, I'll take care of that.

Go to the main phpVMS repository, hit Fork up top, it'll create that repository in your account. Then you can clone that, and commit to it. And then, you can do a pull request, and I can pull your code in. Or, I can add you as a committer here, create a new branch and commit against that branch, with "refs #73" (this ticket) in the commit log.

Here's what I propose:

  1. Add an option under maintenance in the Admin Panel for "auto-update"
  2. Add a link to the auto-update in the admin panel dashboard where it checks the version (using the CHECK_RELEASE_VERSION/CHECK_BETA_VERSION settings that are there)
  3. On the auto-update page, check for a newer version according to the above settings
  4. Have it be a two-step thing, a ?page=1 and ?page=2, though page 1 is default
  5. Page 1 checks the permissions of files, whether they have the proper zip extensions and other requirements
  6. There's a link on page 1 that says "update now", and it will forward to page 2
  7. Page 2 downloads the zip or tarball from github for the appropriate version and then extracts it
  8. Page 2 has a link to forward to the install/update.php file to complete the update

@tomsterritt
Copy link
Member Author

Yeah I can use git, it's the getting code back up into here I've never done before... I've always been committing straight to repos.

I will take a look soon then :)

@nabeelio
Copy link
Member

If it's cloned from here, it's just

git commit -am "commit message"
git push origin [branch]

Then a pull request through the UI here. If you're on Windows, you can use the new github windows app too.

@tomsterritt
Copy link
Member Author

Yeah I use GitHub for Mac. I didn't know whether or not I needed to pull updates down from here though, didn't work out well when I tried...

I'll do that though, thanks :)

@nabeelio
Copy link
Member

From github you mean? You'd pull changes when there are changes, but I'd do it before you start working. I think phpVMS would be set as a parent if you fork it, there's a command to "fast-forward" changes, though it escapes me right now

@tomsterritt
Copy link
Member Author

Ah ok, did a little googling and followed the instructions more closely than last time.

I added this repo as remote upstream to my fork, and then used: git pull --ff-only upstream master

Cool, all set up now :P

@nabeelio
Copy link
Member

Ah great. Just create a new branch called "updater", and then commit that, then push that to me. We can see if that works.

@tomsterritt
Copy link
Member Author

Branches is effort... i.e. I can't do it from the GitHub for Mac client... can I not leave it on master? D:

@nabeelio
Copy link
Member

That's fine, I'll merge it on my end then, no worries
Just in the commit, do "refs #73" as the first bit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants