diff --git a/VandyScheduler.zip b/VandyScheduler.zip new file mode 100644 index 0000000..1f509b5 Binary files /dev/null and b/VandyScheduler.zip differ diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 2600ac2..632cb9a 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -24,7 +24,8 @@ writeVersion() { local version=$1 version=${version#v} - jq ".version=\"$version\"" < manifest.json > manifest.json + jq ".version=\"$version\"" < manifest.json > tmp-manifest + mv tmp-manifest manifest.json } build() { @@ -44,14 +45,19 @@ getFiles() { } copyFiles() { - local files=( "$( getFiles )" ) + local files=( $( getFiles ) ) mkdir $VS_TMP - cp -r ./{$(IFS=,; echo "${files[*]}"),manifest.json} $VS_TMP/ + + for file in ${files[@]}; do + cp -r ./$file $VS_TMP/ + done + + cp ./manifest.json $VS_TMP/ } createZip() { cd $VS_TMP - zip -rq "$TMP_DIR/VandyScheduler.zip" * + zip -rq "../VandyScheduler.zip" * cd - mv "$TMP_DIR/VandyScheduler.zip" ./VandyScheduler.zip } @@ -59,6 +65,11 @@ createZip() { main() { + if [[ -z $1 ]]; then + print "A version must be passed in" + exit 1 + fi + print "Validating version" validateVersion $1 print "writing version"