Giter VIP home page Giter VIP logo

Comments (13)

bahiirwa avatar bahiirwa commented on June 16, 2024 1

Did the plugin change the way it is served? I see “master” on the folder this was probably downloaded direct from GitHub. If the update changes the plugin folder, this error is probable.

from classicpress-seo.

zulfgani avatar zulfgani commented on June 16, 2024 1

What you want to do is encourage user to download "a named zip" file from the releases page rather than the main download link of the repo. This will eliminate the issue for those who do not change the plugin folder name to remove the -master or the version tag.

Create a zip file of the latest version named classicpress-seo and then when creating a release point you'd upload this zip in the given field (see screenshot) marked "Attach binaries by dropping....."
Screenshot

Once the release is saved, in your Assets you'll have 3 items (the 2 source + the named zip) just as you see on the Migrate plugin. The named zip is the one that should be linked to when giving the download link out to users.

GitHub updater already strips out the added -master or version tag so there should be no issue when updating the plugin.

from classicpress-seo.

zulfgani avatar zulfgani commented on June 16, 2024 1

You are welcome @timbocode.

It's a yes for both questions as that is what I'm doing here. Both releases have the same named-zip file in the assets so a user downloading from the latest release will always get the latest version as urls are different for both by the addition of the release tag version.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024 1

Brilliant. Thanks @zulfgani

from classicpress-seo.

xxsimoxx avatar xxsimoxx commented on June 16, 2024 1

Fastest way to generate the zip file is using
git archive -o "myplugin.zip" HEAD
in the root folder of a plugin.

I found useful using hub to draft a release attaching the zip file.
hub release create -d -a "myplugin.zip" -m "v1.2.3" "v1.2.3"

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024 1

Thanks for this @xxsimoxx . That hub extension looks interesting. I'll give it a try.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024

Yes, @bahiirwa thanks for the comment. I'm sure it's because the zip file extracts to classicpress-seo-master whereas most installation folders are just classicpress-seo. I haven't looked into this yet but if you know how to get the zip to extract to just classicpress-seo, I'd be grateful for some advice.

from classicpress-seo.

bahiirwa avatar bahiirwa commented on June 16, 2024

Would be good to find out from CP how the migration plugin releases are done. They come with a custom zip file name.

However, there is another hack. This is what I have found so far. https://stackoverflow.com/a/23642622/6773883.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024

Thanks for the link. That looks very similar to what we've had to do with Installatron. Looks good as a workaround but as you say, it'd be good to know if there's a "proper" way to do it. I'll tag @nylen to see if he can throw any light on it.

from classicpress-seo.

zulfgani avatar zulfgani commented on June 16, 2024

The zip file is added manually when creating a release point, at least that's what I do with my repos. I then reference that url in the updater plugin.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024

I have a few releases for Classic SEO. For example: https://github.com/ClassicPress-research/classicpress-seo/archive/v0.3.2.zip. However, this still extracts to classicpress-seo-0.3.2 and not just classicpress-seo.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024

Thanks very much for this @zulfgani . I'd never thought of doing it that way. I just assumed that GitHub had some hidden magic that I was missing.

So would you recommend keeping the name of the zip the same for each release, regardless of version number. For example, name it classicpress-seo.zip (or whatever) and keep that name for each release / upload?

And as far as GitHub Updater goes, just to confirm, there's nothing I need to change? That will download classicpress-seo-master.zip each time and remove the -master part automatically? Genius.

from classicpress-seo.

timbocode avatar timbocode commented on June 16, 2024

Closing this issue. No further reports of problems when updating. Comments / suggestions above helped resolve this. Also intend to switch to the CodePotent Update Manager. See #29

from classicpress-seo.

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.