Giter Club home page Giter Club logo

Comments (17)

shytikov avatar shytikov commented on May 13, 2024

👍

from xrmtoolbox.

shytikov avatar shytikov commented on May 13, 2024

I've seen that some code for markdown manipulation was checked in recently. But it should be adopted to work with plugins as well...

So we're talking about PluginBase extension that will check new version of current plugin, right?

from xrmtoolbox.

MscrmTools avatar MscrmTools commented on May 13, 2024

As checking for new version is source control system dependent, it should be implemented in IGithubPlugin and ICodeplexPlugin interface so that it would be possible to check on respective source control system for updates.

As for markdown display, I added something to format it correctly. Well, at least, the maximum I can do since github markdown seems to be a specific implantation of markdown.

from xrmtoolbox.

daryllabar avatar daryllabar commented on May 13, 2024

This brings up an interesting design decision. I created the ICodeplexPlugin and IGithubPlugin for the toolbox to be able to show ratings of plugins. This requires the developer to declare and implement the interface. Ideally (IMHO) we would create an IVersionChecker (or preferably some bettered named interface, naming things is hard), that both ICodeplexPlugin and IGitHubPlugin can implement. That way the calling code just cares that it implements IVersionChecker, not if its an IGitHubPlugin or an ICodeplexPlugin, and if someone manages to host something on their own public website, they could still implement the interface.

from xrmtoolbox.

rappen avatar rappen commented on May 13, 2024

👍 @daryllabar

from xrmtoolbox.

daryllabar avatar daryllabar commented on May 13, 2024

It sounds like @rappen is talking about creating an abstract GithubPluginBase for the toolbox that implements version checking automagically, and a way to display release notes.

I like the idea but thought it would be a good idea to brainstorm where that will lead us to. It might be better to have some other class that performs the actual version check logic besides the Plugin itself. the Plugin can expose a property of the class, but it doesn't have to be able to implement the interface itself. The beautiful part about the PluginBase is we can change the IPlugin interface and as long as the PluginBase provides an implementation, no one who inherits from the PluginBase will break.

from xrmtoolbox.

shytikov avatar shytikov commented on May 13, 2024

Jedi mind tricks shell perform I, so it will be abstract GithubPluginBase that extends PluginBase and implements IGitHubPlugin?

from xrmtoolbox.

daryllabar avatar daryllabar commented on May 13, 2024

Unless we want to do some other class that the plugin base can expose as a property. That way if a plugin doesnt inherit from plugin base, they could still potentially reuse your logic...

from xrmtoolbox.

skfd avatar skfd commented on May 13, 2024

My advice is to allow impementing IUpdatable interface. This interface will require one field -- Github repo and a branch name. This branch should contain plugin.json with semver version.

Autoupdate does not have to be mandatory.

from xrmtoolbox.

MscrmTools avatar MscrmTools commented on May 13, 2024

Are you saying that we should only support Github as a repository for XrmToolBox plugins? I have the code to check a new version on CodePlex but what if other repositories are used?

from xrmtoolbox.

skfd avatar skfd commented on May 13, 2024

It could be different well known code hosting sites, I'm just suggesting a principle of version detection.

from xrmtoolbox.

rappen avatar rappen commented on May 13, 2024

IMHO I think the basic solution @MscrmTools (and me) is using by having a naming convention for the tag_name field on the release is quite good enough. It worked with CodePlex, it works with GitHub, and it is OOB in that sense.
The level of abstraction / interfacing is another question, my first approach would have been to just expose the existing method as public and adding parameters to look up the repo...
Might be a bit "unfancy", but works ;)

from xrmtoolbox.

shytikov avatar shytikov commented on May 13, 2024

I would put ourselves to @rappen's hands as soon as he has an active request for this feature. 💯

from xrmtoolbox.

rappen avatar rappen commented on May 13, 2024

I will probably not have the time to implement this in near future. Making my own version of this in FXB until we have a common way of handling this.
I will implement it in a more generic way though, by adding user and repo as input parameters to the version checker.
Commit for FXB here: rappen/FetchXMLBuilder@c5cc598

from xrmtoolbox.

MscrmTools avatar MscrmTools commented on May 13, 2024

About this one, I can expose the class publicly.

I just noticed that I check for any new version, even if it is a prerelease. Do we agree I should check only for release and not for pre release as well?

from xrmtoolbox.

rappen avatar rappen commented on May 13, 2024

Agree. Only Release.
I guess only github-user and -repo is necessary as parameters to the public method. I also noticed the download link was static, not based on user/repo.

from xrmtoolbox.

MscrmTools avatar MscrmTools commented on May 13, 2024

Got it! Updated too!

from xrmtoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.