Permalink
Browse files

Initial untested work toward automating brew recipe update also.

  • Loading branch information...
jmchilton committed Oct 19, 2015
1 parent e149119 commit 4d6f7d96389081f18222001c42557341aa2784dc
Showing with 34 additions and 1 deletion.
  1. +3 −0 .gitignore
  2. +3 −0 Makefile
  3. +1 −1 docs/developing.rst
  4. +27 −0 scripts/update_planemo_recipe.bash
@@ -46,3 +46,6 @@ docs/_build
.venv

tool_test_output.*

# Used by build process to push updated brew formula.
homebrew-tap
@@ -130,6 +130,9 @@ new-version:

release: commit-version release-aritfacts new-version

release-brew:
bash scripts/update_planemo_recipe.bash $(VERSION)

push-release:
git push $(UPSTREAM) master
git push --tags $(UPSTREAM)
@@ -33,4 +33,4 @@ are fine.
* ``make clean && make lint && make test``
* ``make release VERSION=<old_version> NEW_VERSION=<new_version>``
* ``make push-release``
* Update planemo homebrew recipe to new version.
* ``make release-brew VERSION=<old_version>`` (Update planemo homebrew recipe to new version, this works if no new requirements have been added.)
@@ -0,0 +1,27 @@
#!/bin/bash

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

if[ -d homebrew-tap ];
then
git clone git@github.com:$HOMEBREW_TAP.git homebrew-tap
fi
cd homebrew-tap

brew uninstall planemo
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
brew install planemo.rb > output
#For your reference the SHA256 is: efc829aa1c579c5d8cace3a3da46284aa1a78fbec80f3a5a31a73e08f5d2bc6e
sha_line=`awk '/For your reference the SHA256 is:/' output`
echo "sha_line is $sha_line"
IFS=" " read -a sha_line_array <<< "$sha_line"
sha=${sha_line_array[6]}
echo "Updating SHA256 to $sha"
sed -i "s/^ sha256.*$/ sha256 \"$sha\"/" planemo.rb

git add planemo.rb
git commit -m "Rev planemo to version $VERSION"
git push

0 comments on commit 4d6f7d9

Please sign in to comment.