Permalink
Browse files

Update Homebrew recipe updater.

  • Loading branch information...
jmchilton committed Aug 19, 2016
1 parent bf87c08 commit c262b6d892218b49f114e73b254617f8f220001b
Showing with 7 additions and 5 deletions.
  1. +7 −5 scripts/update_planemo_recipe.bash
@@ -3,9 +3,9 @@
set -e

HOMEBREW_TAP="galaxyproject/homebrew-tap"
VERSION=$1

shift
VERSION=`python -c "import xmlrpclib; print xmlrpclib.ServerProxy('https://pypi.python.org/pypi').package_releases('planemo')[0]"`
URL=`python -c "import xmlrpclib; import re; print re.escape([s for s in xmlrpclib.ServerProxy('https://pypi.python.org/pypi').release_urls('planemo', '$VERSION') if s['filename'].endswith('.tar.gz')][0]['url'])"`
SHA256=`sha256sum dist/planemo-$VERSION.tar.gz | cut -d' ' -f1`

if [ ! -d homebrew-tap ];
then
@@ -14,8 +14,10 @@ fi
cd homebrew-tap

brew uninstall planemo || true
sed -E -i "s/planemo-([0-9]+)\.([0-9]+)\.([0-9]+)\.tar\.gz/planemo-$VERSION.tar.gz/" planemo.rb
sed -i "s/^ sha256.*$/ sha256 \"\"/" planemo.rb
echo $URL
sed -E -i "s/^ url.*$/ url \"$URL\"/" planemo.rb
echo $SHA256
sed -i "s/^ sha256.*$/ sha256 \"$SHA256\"/" planemo.rb
brew install planemo.rb > output
#For your reference the SHA256 is: efc829aa1c579c5d8cace3a3da46284aa1a78fbec80f3a5a31a73e08f5d2bc6e
sha_line=`awk '/For your reference the SHA256 is:/' output`

0 comments on commit c262b6d

Please sign in to comment.