Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload_curseforge() -- jq -e not extracting correct version_name #149

Closed
solagegrey opened this issue Jan 24, 2023 · 2 comments
Closed

upload_curseforge() -- jq -e not extracting correct version_name #149

solagegrey opened this issue Jan 24, 2023 · 2 comments

Comments

@solagegrey
Copy link

Since WoW version 10.*, I have had to set the correct game version manually on CurseForge site, because it's been getting pushed as "1.0.0". (See below inserted screen snip.)
upload_curseforge_snip

I'm familiar with JSON, and not at all familiar with jq; but I believe the jq command in the upload_curseforge() function may need to be updated?

With some experimenting, I've been able to extract using jq -e ... with .apiVersion instead of .name:

command:
jq -e --arg v "100005" --argjson t "517" 'map(select(.gameVersionTypeID == $t and .apiVersion == $v))' < file.txt

output:
[
{
"id": 9711,
"gameVersionTypeID": 517,
"name": "10.0.5",
"slug": "10-0-5",
"apiVersion": "100005"
}
]

file.txt is the output from curl -s -H "x-api-token: <my-token>" https://www.curseforge.com/api/game/versions

@ntowle
Copy link
Member

ntowle commented Jan 24, 2023

See #140.

@solagegrey
Copy link
Author

thank you - I'll be sure to use v2 from now on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants