Git-updater: On Plugins page active branch message is incorrect

Created on 13 Apr 2017  路  15Comments  路  Source: afragen/git-updater

Hi,

I changed the branch of a certain plugin, and it downloaded the right branch and the code is updated, but on the plugins page it always says that I'm on master branch.

All 15 comments

That's because you don't have the branch header correctly added to the specific branch. If no branch header is present the default is 'master'. GHU gets the branch info from this header.

I have included an explanation in the wiki too. https://github.com/afragen/github-updater/wiki/Versions-and-Branches

Would it make sense to save the branch name in wp_options when we switch branches and show that information instead?

I think branches are very dynamic, you create a lot of them to create new features and most of the times I think developers won't change that header.

At least for me, when I'm developing a new plugin I'm always updating the code via Branch Switching and it would be interesting to not have to change that header every time I create a new branch. (just a suggestion)

Would it be useful to do a pull request with this or you think it makes more sense to read the branch name always from the header?

Thanks!

I understand the difficulty, especially when you are creating many temporary branches. Let me think about how best to implement this.

@dbeja check out the branch branch. Make sure you refresh your cache after after you switch.

The primary drawback is that if you have users test specific branches you can get them back on a different branch by pushing a commit with a different branch header and a version bump. Well you have to do that twice. I don鈥檛 think that鈥檚 possible any with this change.

Hmm we always deploy from a deploy branch so I'm not sure I'd use this feature... but I don't think it would negatively impact my process in any significant way so I'm neutral/in favor of this change.

This branch and concept means that Branch headers would be supported but unnecessary and overwritten.

Great! For me, it's more useful this way!

I found one bug:

  1. Installed a plugin via Github Updater
  2. On Plugins page changed branch to a develop branch (and it worked fine)
  3. Deleted plugin
  4. Installed the same plugin via Github Updater (master branch selected)
  5. On plugins page it says Current Branch is develop

Yes, did some tests and worked very well!

I think I've got most of the bugs worked out. Hammer on it. Find all the issues.

I made a few, likely inconsequential, changes. If I don't hear of any issues I'll likely merge into develop this weekend.

All the tests I did worked perfectly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blachawk picture blachawk  路  12Comments

klihelp picture klihelp  路  4Comments

picasso picture picasso  路  9Comments

hell-w-rld picture hell-w-rld  路  7Comments

warudin picture warudin  路  7Comments