Skip to content

Instantly share code, notes, and snippets.

@nwolverson
Created March 11, 2017 21:19
Show Gist options
  • Save nwolverson/ec8558d742086556503cc30c4800ea7d to your computer and use it in GitHub Desktop.
Save nwolverson/ec8558d742086556503cc30c4800ea7d to your computer and use it in GitHub Desktop.
#!/bin/bash
# TODO: Get current git tag
VER=${1:-"1.0.0"}
psc-package dependencies | perl -pe 's/^(.*)$/"\1"/g' | jq -s . > deps.json
jq < psc-package.json --slurpfile bower bower.json --slurpfile deps deps.json --arg version "$VER" --arg deps "$DEPS" \
'{(.name): { dependencies: ($deps | .[0]), repo: ($bower | .[0].repository.url | gsub("git:";"https:") ), version: $version } }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment