Permalink
Browse files

improve release script to accept a tag separate from version

  • Loading branch information...
avsm committed Mar 8, 2017
1 parent 2162583 commit eeeaf146de56a9d9b7c22fb7c0bbf094671d9a05
Showing with 13 additions and 8 deletions.
  1. +13 −8 shell/gen-release.sh
View
@@ -1,17 +1,22 @@
#!/bin/sh
#!/bin/sh -ex
# Generate a release of a particular tag of opam-depext with
# the vendor tarballs included.
if [ "$1" = "" ]; then
echo Usage: $0 version
v=$1
shift
tag=$1
shift
if [ "$tag" = "" ]; then
echo Usage: $0 version tag
exit 1
fi
git archive --format=tar --prefix=opam-depext-$1/ master > ../opam-depext-$1.tar v$1
git archive --format=tar --prefix=opam-depext-$v/ $tag > ../opam-depext-$v.tar
cd ..
tar -xvf opam-depext-$1.tar
cd opam-depext-$1
tar -xvf opam-depext-$v.tar
cd opam-depext-$v
make distrib
cd ..
tar -jcvf opam-depext-full-$1.tbz opam-depext-$1
rm -f opam-depext-$1.tar
tar -jcvf opam-depext-full-$v.tbz opam-depext-$v
rm -f opam-depext-$v.tar

0 comments on commit eeeaf14

Please sign in to comment.