#!/bin/sh -x
rm -rf node_modules
rm -f package*
npm install assemblyscript
version=`grep '"version":' node_modules/assemblyscript/package.json | sed -e 's;.*: ";;' -e 's;".*;;'`
date=`date '+%Y%m%d'`
tar cvf - --exclude .nyc_output node_modules | gzip -9 >assemblyscript-$version-$date.tar.gz
rm -rf node_modules
rm -f package-lock.json
