Extensions and version-check (w/ github)

Discussion forum for Extension Writers regarding Extension Development.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Extensions and version-check (w/ github)

Post by 3Di »

Hi,
I'm trying to add a version-check directly to/from github to an extension I'm developing.

What i get, after variouses attempts is
Failed to obtain latest version information.

Re-Check version
The error is quite clear, just I am guessing where the issue lies into my code.

The excerpt from the composer.json

Code: Select all

		"version-check":
		{
			"host": "github.com",
			"directory": "/3D-I/online-since/blob/master",
			"filename": "onlinesince-vcheck.json"
		}
The whole onlinesince-vcheck.json

Code: Select all

{
    "stable": {
        "1.0": {
            "current": "1.0.1",
            "download": "https://github.com/3D-I/online-since/archive/RC2.zip",
            "announcement": "",
            "eol": null,
            "security": false
        }
    },
    "unstable": {
        "1.0": {
            "current": "1.1.0-b1",
            "download": "",
            "announcement": "",
            "eol": null,
            "security": false
        }
    }
}
Where I am wrong? Thanks.


edit: edited the Topic's title.
Last edited by 3Di on Sun Feb 21, 2016 10:30 pm, edited 1 time in total.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1653
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

Re: Extensions and version-check

Post by Crizzo »

Hi,

to github you have a htts-connection, right?

And you tested this with phpBB 3.1.7-pl1? When yes, phpBB < 3.1.8 does not support SSL connections for extension version check.

But 3.1.8 does, so try it with 3.1.8 :)

Regards
My extensions for phpBB: CDB
German phpBB Support at www.phpbb.de
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check

Post by 3Di »

Crizzo wrote:But 3.1.8 does, so try it with 3.1.8
Im on 3.1.8-RC1 actually.
Should I install the final 3.1.8?
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
LavIgor
Registered User
Posts: 545
Joined: Mon Apr 28, 2014 1:47 pm

Re: Extensions and version-check

Post by LavIgor »

Marco, there are lots of examples around this board - check out extensions in development.
The best way for GitHub is to use the gh-pages branch. Check out GitHub Pages documentation.
Then you can simply use something like 3D-I.github.io as the domain name.
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1653
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

Re: Extensions and version-check

Post by Crizzo »

The RC1 and final should be nearly the same. And the SSL-feature should be included in both files.

The second reason is, your onlinesince-vcheck.json has an error or is not accessable.

So change line 3 and 12 to "3.1": {

And do you link to the "raw"-file? Try this link: https://raw.githubusercontent.com/3D-I/ ... check.json

Is it now working?
My extensions for phpBB: CDB
German phpBB Support at www.phpbb.de
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check

Post by 3Di »

No, and I don't think that matters? 1.0 isn't the serie of my extension?

edit: I am now trying the raw..
Last edited by 3Di on Sun Feb 21, 2016 10:10 pm, edited 1 time in total.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1653
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

Re: Extensions and version-check

Post by Crizzo »

I'm not sure. But i think you have to link to the raw file instead of the file you did. That should work.
My extensions for phpBB: CDB
German phpBB Support at www.phpbb.de
LavIgor
Registered User
Posts: 545
Joined: Mon Apr 28, 2014 1:47 pm

Re: Extensions and version-check

Post by LavIgor »

Crizzo wrote:So change line 3 and 12 to "3.1": {
No, it is not the phpBB branch but extension's branch.
Check out the wiki: https://wiki.phpbb.com/Extension_meta_d ... sion_Check.

Marco, have you tried my suggestion?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check

Post by 3Di »

LavIgor wrote:
Crizzo wrote:So change line 3 and 12 to "3.1": {
No, it is not the phpBB branch but extension's branch.
Check out the wiki: https://wiki.phpbb.com/Extension_meta_d ... sion_Check.

Marco, have you tried my suggestion?
As a matter of fact "1.0" is the serie (branch) of my extension, I did revert that change and used the RAW's link too .. but no success.

Now I am bound to try your suggestio..
also if my goal woild be to have a folder there in github dedicated just to extension's checkers, screenshots, assets or so on, like a depot.

Let's see though, I will report.
Thank you.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di »

In the meantime I did roll-back all the changes done and fixed the "unstable" part to follow the branch versioning like this:

Code: Select all

    "unstable": {
        "1.1": {
            "current": "1.1.0-b1",
            "download": "",
            "announcement": "",
            "eol": null,
            "security": false
        }
    }
    
The actual GISTs as them are now:
https://gist.github.com/3D-I/941ff171e80146917d1a (composer's excerpt)

https://gist.github.com/3D-I/dd15fb4298a08ba4b409 (the version-checker)

Still the issue remains, though.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check

Post by 3Di »

LavIgor wrote:Marco, there are lots of examples around this board - check out extensions in development.
The best way for GitHub is to use the gh-pages branch. Check out GitHub Pages documentation.
Then you can simply use something like 3D-I.github.io as the domain name.
^this^
Thanks for the pointer, I thought a little bit later that Github Pages act like a server, since I already had sh-pages setup as a branch 6 months ago I went there, uploaded the version checker file, changed a bit into the composer.json like this

Code: Select all

		"version-check":
		{
			"host": "3d-i.github.io",
			"directory": "/online-since",
			"filename": "onlinesince-vcheck.json"
		}
		
the version check file

Code: Select all

{
    "stable": {
        "1.0": {
            "current": "1.0.1",
            "download": "https://github.com/3D-I/online-since/archive/RC2.zip",
            "announcement": "",
            "eol": null,
            "security": false
        }
    },
    "unstable": {
        "1.1": {
            "current": "1.1.0-b1",
            "download": "",
            "announcement": "",
            "eol": null,
            "security": false
        }
    }
}
and everything is working now. :)

But shouldn't say I am not using a stable release since I am using 1.1.0-b1 stated as unstable? I am investigating.

edit: Found the reason why, settings in ACP? It's always green saying I am up to date.. correct behaviour?

Once again thank you for to have pointed me there.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: Extensions and version-check (w/ github)

Post by MattF »

Formerly known as VSEMy ExtensionsPlease do not PM me for support.
LavIgor
Registered User
Posts: 545
Joined: Mon Apr 28, 2014 1:47 pm

Re: Extensions and version-check

Post by LavIgor »

3Di wrote:But shouldn't say I am not using a stable release since I am using 1.1.0-b1 stated as unstable? I am investigating.
No, at least not in the current implementation of version checking feature. If you use an unstable release - it means that you have already understood any possible consequences (bugs and unfinished features). In this case phpBB checks for all available releases (stable and unstable) and gets the one with the highest version number to compare with the current version.
3Di wrote:edit: Found the reason why, settings in ACP? It's always green saying I am up to date.. correct behaviour?
If you use a stable release (without a suffix) and do not have the setting for checking beta releases set - then phpBB only checks for the latest stable release ignoring unstable ones.
In other cases it checks for any latest release as I described before.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di »

VSE wrote:Use your github.io user account page.
https://github.com/VSEphpbb/smartsubjec ... on#L25-L29
Hello VSE, so did I.. thx. :)

At the end of all yesterday I went through the GitHub Help Pages and followed a couple of Tuts, the result is that I created a repository dedicated to be a sort of website that I am using as a depot/container.. that was my final goal as I above said.

Code: Select all

		"version-check":
		{
			"host": "3d-i.github.io",
			"directory": "/site/vchecks",
			"filename": "onlinesince-vcheck.json"
		}
Helped out this tut: https://help.github.com/articles/creati ... -manually/ (there are errors there but anybody who know a little of the GitHub logic will survive to this and fix him/herselves the small typos).

A couple of links for the posterity:
https://help.github.com/categories/cust ... hub-pages/
(explains everything about how to use of your new website, includes Jekyll)

https://help.github.com/articles/using- ... hub-pages/
(how to use your own domain name with github. That's what I will do nextly. I own 2 domain names not yet in use).

@ LavIgor
a good and accurate explaination I can say, I do like to learn. :)

Thank you all.
Regards.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Extensions and version-check (w/ github)

Post by kasimi »

A quick update:
Securing your GitHub Pages site with HTTPS wrote:HTTPS enforcement is required for GitHub Pages sites created after June 15, 2016 and using a github.io domain. If you created your GitHub Pages site before June 15, 2016, you can manually enable HTTPS enforcement. HTTPS is not supported for GitHub Pages using custom domains.
This means that extensions that use such a version file on GitHub have a minimum requirement of phpBB 3.1.8-RC1 and they need to add "ssl": true to the version-check object in their composer.json.
Post Reply

Return to “Extension Writers Discussion”