1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/development/generate-migration.sh

16 lines
426 B
Bash
Raw Normal View History

#! /bin/bash
g-migration() {
[[ -z "$1" ]] && { echo "Migration version is required!" ; exit 1; }
local vnum=$1
if (($1 < 100)); then
vnum=0$1
fi
touch app/scripts/migrations/"$vnum".js
cp app/scripts/migrations/template.js app/scripts/migrations/"$vnum".js
touch app/scripts/migrations/"$vnum".test.js
cp app/scripts/migrations/template.test.js app/scripts/migrations/"$vnum".test.js
}
g-migration "$1"