Skip to content

Instantly share code, notes, and snippets.

@marclambrichs
Created August 28, 2019 15:00
Show Gist options
  • Save marclambrichs/bfe7a905284957dd31b151265dd5578b to your computer and use it in GitHub Desktop.
Save marclambrichs/bfe7a905284957dd31b151265dd5578b to your computer and use it in GitHub Desktop.
Create list of jenkins plugins and versions
find . -maxdepth 1 -name "*.[hj]pi" |\
awk '{s=gensub(/\.\/([^.]+)\.[hj]pi/, "\\1", "g"); print s}' |\
xargs -I @ awk -v p=@ '/Plugin-Version/{s=gensub(/Plugin-Version: (.*)/, "\\1", "g");printf "%s: %s\n",p,s}' "@/META-INF/MANIFEST.MF" |\
sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment