Page 1 of 3

Extensions and version-check (w/ github)

Posted: Sun Feb 21, 2016 9:20 pm
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.

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 9:47 pm
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

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 9:54 pm
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?

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 9:59 pm
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.

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 9:59 pm
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?

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 10:09 pm
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..

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 10:09 pm
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.

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 10:13 pm
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?

Re: Extensions and version-check

Posted: Sun Feb 21, 2016 10:21 pm
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.

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

Posted: Sun Feb 21, 2016 11:27 pm
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.

Re: Extensions and version-check

Posted: Mon Feb 22, 2016 12:12 am
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.

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

Posted: Mon Feb 22, 2016 4:22 pm
by MattF

Re: Extensions and version-check

Posted: Mon Feb 22, 2016 8:03 pm
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.

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

Posted: Mon Feb 22, 2016 10:22 pm
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.

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

Posted: Sun Sep 25, 2016 8:35 pm
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.