Skip to content

Commit c262b6d

Browse files
committed
Update Homebrew recipe updater.
1 parent bf87c08 commit c262b6d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scripts/update_planemo_recipe.bash

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -e
44

55
HOMEBREW_TAP="galaxyproject/homebrew-tap"
6-
VERSION=$1
7-
8-
shift
6+
VERSION=`python -c "import xmlrpclib; print xmlrpclib.ServerProxy('https://pypi.python.org/pypi').package_releases('planemo')[0]"`
7+
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'])"`
8+
SHA256=`sha256sum dist/planemo-$VERSION.tar.gz | cut -d' ' -f1`
99

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

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

0 commit comments

Comments
 (0)