ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: nwsw on January 20, 2023, 08:09:14 am

Title: Detailed version check ElkArte Package 'ourVersion' error
Post by: nwsw on January 20, 2023, 08:09:14 am
The Detailed version check page uses data returned from:

https://api.github.com/repos/elkarte/Elkarte/releases

The elk_AdminIndex.prototype.showCurrentVersion (https://github.com/elkarte/Elkarte/blob/master/themes/default/scripts/admin.js) js function uses the tag_name property as so:

if (!previous.hasOwnProperty('major') || verCompare.compareVersions(sCurrentVersion, elem.tag_name.replace('-', '').substring(1)))

This code assumes that all tag names start with a 'v' as the first letter. The 1.1.7 (https://github.com/elkarte/Elkarte/releases/tag/1.1.7) tag does not have a preceding 'v' causing it to be treated incorrectly.

The easiest fix for this would be to replace the 1.1.7 tag with a proper v1.1.7 tag.
Title: Re: Detailed version check ElkArte Package 'ourVersion' error
Post by: Spuds on January 20, 2023, 05:48:38 pm
I had notice this as well ... made a change in 1.1.9 to allow for the a missing 'v' in the release name.

Not sure how to go about changing a tag name, that is beyond my git knowledge, but if someone has the proper command to use I'll run it!
Title: Re: Detailed version check ElkArte Package 'ourVersion' error
Post by: nwsw on January 21, 2023, 04:25:03 am
You can fix this directly in github. Start at:

https://github.com/elkarte/Elkarte/releases/edit/1.1.7

Click on the tag, add the 'v' prefix letter, press Enter, then save the release. The release time and order shouldn't change when doing this (it didn't for me when I tested this).

You can now delete the old 1.1.7 tag, leaving only the correct v1.1.7 tag for the release, from:

https://github.com/elkarte/Elkarte/tags
Title: Re: Detailed version check ElkArte Package 'ourVersion' error
Post by: Spuds on January 21, 2023, 07:03:36 pm
That kind of worked ... the issue appeared to be that since another later  tag existed, when I changed the name it reset the commit point to 1.1.8

So then I did a  git tag v1.1.7 1.1.7^{} which is supposed to make an alias of an existing tag, lets hope.

Next deleted the old one git tag -d 1.1.7

Pushed that alias/tags to the repo git push ElkArte :refs/tags/1.1.7

Finally git push ElkArte --tags

I think that worked  :zipper_mouth: :pray:
Title: Re: Detailed version check ElkArte Package 'ourVersion' error
Post by: nwsw on January 21, 2023, 07:56:54 pm
I didn't have those problems on the web interface, but the release json appears to be fixed at:

https://api.github.com/repos/elkarte/Elkarte/releases
Title: Re: Detailed version check ElkArte Package 'ourVersion' error
Post by: Spuds on January 22, 2023, 04:40:58 pm
Cool ... and thank you!