Guest User

Untitled

a guest
May 9th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr//bin/gawk -f
  2.  
  3. # This script modifies a package.json file. It removes the author and adds
  4. # a lead maintainer given my the environment variables `LEAD_MAINTAINER_NAME`
  5. # and `LEAD_MAINTAINER_EMAIL`.
  6. {
  7. key = $1
  8. # Remove author
  9. if(key == "\"author\":") {
  10. next
  11. }
  12. if (key == "\"description\":") {
  13. print $0
  14. #print " \"leadMaintainer\": \"A Test <[email protected]>\""
  15. print " \"leadMaintainer\": \"" ENVIRON["LEAD_MAINTAINER_NAME"] " <" ENVIRON["LEAD_MAINTAINER_EMAIL"] ">\","
  16. next
  17. }
  18. print $0
  19. }
Add Comment
Please, Sign In to add comment