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