softwareCobbler / luceedebug

line debugger for lucee
GNU Lesser General Public License v2.1
44 stars 15 forks source link

Canonical Download URL Syntax #57

Open jamiejackson opened 1 month ago

jamiejackson commented 1 month ago

Hello,

I had been using this in my Dockerfile (which may have been a hack to begin with):

RUN wget -q $( \
      wget -q -O - https://api.github.com/repos/softwareCobbler/luceedebug/releases/latest \
       | jq -r '.assets[] | select(.name=="luceedebug.jar").browser_download_url' \
    ) \

Now that luceedebug is publishing with version numbers in the jar name, what's the proper way to get latest?

For now, I'm pinning with:

RUN wget -O luceedebug.jar https://github.com/softwareCobbler/luceedebug/releases/download/agent%2F2.0.12/luceedebug-2.0.12.jar
softwareCobbler commented 1 month ago

putzin' with jq, something like one of

jq -r '.assets[] | select(.name | test("^luceedebug-.*\\.jar$"))'
jq -r '.assets[] | select(.name | test("^luceedebug-\\d+\\.\\d+\\.\\d+\\.jar$"))'