Skip to content

Commit

Permalink
fix-meta: add mode argument to release script
Browse files Browse the repository at this point in the history
  • Loading branch information
seliopou committed Mar 27, 2016
1 parent 5e26b71 commit 3f4917b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,21 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

AWS_RELEASE=aws-$(oasis query version)

function release_service() {
local service=$(oasis query name)
local version=$(oasis query version)
local release=$service-${version}
local aws_release=$1
local AWS_RELEASE=$1
echo "== $release"
make distclean > /dev/null
rm -f *.tar.gz
ln -s . $release
tar czf ${release}.tar.gz --exclude=${release}/${release} ${release}/*
rm ${release}
if [[ -n ${COOKIE_JAR+x} ]]; then
git upload-release -c ${COOKIE_JAR} inhabitedtype ocaml-aws ${aws_release} ${release}.tar.gz
git upload-release -c ${COOKIE_JAR} inhabitedtype ocaml-aws ${AWS_RELEASE} ${release}.tar.gz
fi
}

Expand All @@ -60,16 +62,19 @@ function release_top() {
fi
}

function release() {
release_top
local aws_release=aws-$(oasis query version)
function release_libs() {
for lib in $(ls libraries); do
if [[ -d libraries/$lib ]]; then
pushd libraries/$lib > /dev/null
release_service $aws_release
release_service $AWS_RELEASE
popd > /dev/null
fi
done
}

release
case $1 in
"top") release_top;;
"libs") release_libs;;
"all") release_top; release_libs;;
*) echo "usage: release [top|libs|all]"; exit 1;;
esac

0 comments on commit 3f4917b

Please sign in to comment.