Quantcast
Duplicated changelog uploading via API - WoWInterface
Thread Tools Display Modes
10-16-20, 02:36 PM   #1
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Duplicated changelog uploading via API

When I use https://github.com/BigWigsMods/packager to upload my newest versions, I end up getting the provided changelog twice on my addon pages.

E.g.:
https://www.wowinterface.com/downloa...html#changelog

The code executed by the packager is this:

curl -sS --retry 3 --retry-delay 10 -w "%{http_code}" -o "/cygdrive/c/Program Files (x86)/Ludius/World of Warcraft/_retail_/Interface/AddOns/Bagnon_RequiredLevel/.release/wi_result.json" -H "x-api-token: NotPastingMyTokenHere" -F "id=24849" -F "version=1.16" -F "compatible=9.0.1" "-F changelog=</cygdrive/c/Program Files (x86)/Ludius/World of Warcraft/_retail_/Interface/AddOns/Bagnon_RequiredLevel/.release/WOWI-1.16-CHANGELOG.txt" -F "[email protected]/cygdrive/c/Program Files (x86)/Ludius/World of Warcraft/_retail_/Interface/AddOns/Bagnon_RequiredLevel/.release/Bagnon_RequiredLevel_1.16.zip" "https://api.wowinterface.com/addons/update"

The WOWI-1.16-CHANGELOG.txt file is not the problem. It includes the changelog only once.

What's going wrong here?


Also: Does the "compatible" tag have any purpose at all? If I use it like that, the client version of my addons do not get updated on WOWI.


Thanks!
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-16-20, 03:13 PM   #2
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,276
Hmmm compatible seems to be working fine for my test addon...

just changing compatibility (it was previously at some 6.x release)
Code:
curl -H "x-api-token: <token>" -F "id=8163" -F "version=1234567899" -F "compatible=9.0.1" https://api.wowinterface.com/addons/update


This seems to be working for me.

What happens if you just only set the compatible tag? Wonder if something related to the changelog is messing up the setting of the compatible version?
Code:
curl -H "x-api-token: <your token>" -F "id=24849" -F "compatible=9.0.1" https://api.wowinterface.com/addons/update
I don't seem to be getting a double changelog either.

Code:
curl -H "x-api-token: <token>" -F "id=8163" -F "changelog=This is a test" https://api.wowinterface.com/addons/update


Maybe you need to cat out the .txt instead $(cat /path/to/changelog.txt)? I'll try doing it the way you are doing it and see if I can reproduce the issue.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2020-10-16 at 4.01.34 PM.png
Views:	272
Size:	12.9 KB
ID:	9502  Click image for larger version

Name:	Screen Shot 2020-10-16 at 4.04.38 PM.png
Views:	202
Size:	21.0 KB
ID:	9503  
  Reply With Quote
10-16-20, 03:17 PM   #3
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,276
I see funkydude has updated his addons via the api and the packager script and it doesnt look like there are any issues https://www.wowinterface.com/downloa...oice.html#info

I guess what could be different I am trying to think.
  Reply With Quote
10-16-20, 03:25 PM   #4
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Thanks so far. Looking again at the curl call I posted:
Isn't it odd that the -F for my changelog is within the quotation marks??
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-16-20, 03:28 PM   #5
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,276
Oh yeah, that might be it.
  Reply With Quote
10-16-20, 03:49 PM   #6
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Hm, I'm not sure.

This seems to be the normal way this is done by the packager...

Code:
_wowi_args=()
    if [ -f "$wowi_changelog" ]; then
      _wowi_args+=("-F changelog=<$wowi_changelog")
    elif [ -n "$manual_changelog" ]; then
      _wowi_args+=("-F changelog=<$pkgdir/$changelog")
    fi

Code:
result=$( curl -sS --retry 3 --retry-delay 10 \
          -w "%{http_code}" -o "$resultfile" \
          -H "x-api-token: $wowi_token" \
          -F "id=$addonid" \
          -F "version=$archive_version" \
          "${_wowi_args[@]}" \
          -F "[email protected]$archive" \
          "https://api.wowinterface.com/addons/update" )

What else could it be?
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-16-20, 06:23 PM   #7
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
It's getting more and more strange. I just updated
https://www.wowinterface.com/downloa...html#changelog
and this time the double changelog did not occur...
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-17-20, 06:21 PM   #8
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
I also updated the addon I gave as an example above (https://www.wowinterface.com/downloa...html#changelog). This time the changelog was also only pasted once.

But the compatibility has still not been set automatically...
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-17-20, 06:26 PM   #9
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,276
I haven't changed anything on my end.

Could it maybe be the content of the changelog that is not being escaped properly and causing the curl command to have issues?

Just trying to think of what would be different between addons where this is working just fine.
  Reply With Quote
10-17-20, 06:28 PM   #10
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Possible. Is there a way I could experiment with this without messing with any of my actual addons?
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
10-17-20, 06:36 PM   #11
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,276
If you'd like to upload a test addon I can keep it in the queue for awhile?

I did remember we are logging what we get from the API endpoint and yeah for some reason its not getting the compatibility number from you...

Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2020-10-17 at 7.34.24 PM.png
Views:	100
Size:	31.5 KB
ID:	9505  
  Reply With Quote
10-17-20, 06:48 PM   #12
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Oh damn, my bad!!

I forgot that I had commented out the "compatible" tag in my packager script for my classic addons (as you told me here: https://www.wowinterface.com/forums/...220#post336220). Guess I should make this such that it is at least applied for my retail addons.

(The curl instruction I posted above was a dump created by my script, in which I did not comment out the "compatibile" tag...)

Regarding the duplicate changelog: Let's see if it comes up again...


Sorry for the fuss and thank you so much for your support!
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote

WoWInterface » Site Forums » Site help, bugs, suggestions/questions » Duplicated changelog uploading via API

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off