Skip to content

Commit 4d6f7d9

Browse files
committed
Initial untested work toward automating brew recipe update also.
1 parent e149119 commit 4d6f7d9

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ docs/_build
4646
.venv
4747

4848
tool_test_output.*
49+
50+
# Used by build process to push updated brew formula.
51+
homebrew-tap

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ new-version:
130130

131131
release: commit-version release-aritfacts new-version
132132

133+
release-brew:
134+
bash scripts/update_planemo_recipe.bash $(VERSION)
135+
133136
push-release:
134137
git push $(UPSTREAM) master
135138
git push --tags $(UPSTREAM)

docs/developing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ are fine.
3333
* ``make clean && make lint && make test``
3434
* ``make release VERSION=<old_version> NEW_VERSION=<new_version>``
3535
* ``make push-release``
36-
* Update planemo homebrew recipe to new version.
36+
* ``make release-brew VERSION=<old_version>`` (Update planemo homebrew recipe to new version, this works if no new requirements have been added.)

scripts/update_planemo_recipe.bash

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
HOMEBREW_TAP="galaxyproject/homebrew-tap"
4+
VERSION=$1
5+
shift
6+
7+
if[ -d homebrew-tap ];
8+
then
9+
git clone git@github.com:$HOMEBREW_TAP.git homebrew-tap
10+
fi
11+
cd homebrew-tap
12+
13+
brew uninstall planemo
14+
sed -E -i "s/planemo-([0-9]+)\.([0-9]+)\.([0-9]+)\.tar\.gz/planemo-$VERSION.tar.gz/" planemo.rb
15+
sed -i "s/^ sha256.*$/ sha256 \"\"/" planemo.rb
16+
brew install planemo.rb > output
17+
#For your reference the SHA256 is: efc829aa1c579c5d8cace3a3da46284aa1a78fbec80f3a5a31a73e08f5d2bc6e
18+
sha_line=`awk '/For your reference the SHA256 is:/' output`
19+
echo "sha_line is $sha_line"
20+
IFS=" " read -a sha_line_array <<< "$sha_line"
21+
sha=${sha_line_array[6]}
22+
echo "Updating SHA256 to $sha"
23+
sed -i "s/^ sha256.*$/ sha256 \"$sha\"/" planemo.rb
24+
25+
git add planemo.rb
26+
git commit -m "Rev planemo to version $VERSION"
27+
git push

0 commit comments

Comments
 (0)