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