Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Sep 6, 2018
1 parent 3de2481 commit 3915dd1
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions util/make-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash -ex
COMMIT="$1"
RELEASE_ID="$2"
RELEASE_MSG="$3"

if [ -z "${GITHUB_TOKEN}" ]; then
echo "Please set GitHub Token"
exit 1
fi

function hasCommand() {
command -v "$1" >/dev/null 2>&1 || { echo "Please make sure that $1 is in \$PATH."; exit 1; }
}

hasCommand github-release
hasCommand echo
hasCommand date
hasCommand wget

# download CI builds
wget -O "plass-static_linux.tar.gz" "https://mmseqs.com/archive/${COMMIT}/plass-static_sse41.tar.gz"
wget -O "plass-static-osx.tar.gz" "https://mmseqs.com/archive/${COMMIT}/plass-osx-static_sse41.tar.gz"
wget -O "README" "https://raw.githubusercontent.com/soedinglab/plass/master/README.md"

# create release tag
git tag "${RELEASE_ID}" && git push --tags

# create a formal release
github-release release \
--user soedinglab \
--repo plass \
--tag "${RELEASE_ID}" \
--name "Plass Release $RELEASE_ID" \
--description "$RELEASE_MSG" \
--pre-release

# upload Linux static binary
github-release upload \
--user soedinglab \
--repo plass \
--tag "${RELEASE_ID}" \
--name "Plass-Linux.tar.gz" \
--file plass-static_linux.tar.gz

# upload OSX static binary
github-release upload \
--user soedinglab \
--repo plass \
--tag "${RELEASE_ID}" \
--name "Plass-Osx.gz" \
--file plass-static-osx.tar.gz

github-release upload \
--user soedinglab \
--repo plass \
--tag "${RELEASE_ID}" \
--name "README" \
--file README

0 comments on commit 3915dd1

Please sign in to comment.