From 1a01fe44052722f99078447a8446bee4e808a1d8 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 15 May 2023 14:33:20 +1200 Subject: [PATCH] feat: Auto zip --- .gitignore | 5 ++++- package.json | 3 ++- zip.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100755 zip.sh diff --git a/.gitignore b/.gitignore index 9826b5c..c2757e9 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,7 @@ dist-ssr *.sw? # Environment variables -.env \ No newline at end of file +.env + +# Misc +seng365-assignment2-omdb-vno16.zip \ No newline at end of file diff --git a/package.json b/package.json index f1f49ac..c4ee1f0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "start": "vite", "build": "tsc && vite build", - "preview": "vite preview" + "preview": "vite preview", + "submit": "chmod +x ./zip.sh && ./zip.sh" }, "dependencies": { "@d-exclaimation/common": "^0.4.0-beta.9", diff --git a/zip.sh b/zip.sh new file mode 100755 index 0000000..28e248d --- /dev/null +++ b/zip.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Remove old zip +if [ ! -f "seng365-assignment2-omdb-vno16.zip" ]; then + rm seng365-assignment2-omdb-vno16.zip +fi +if [ ! -d "temp" ]; then + rm -rf temp +fi +mkdir temp + +# Copy files +cp -r src temp/src +cp -r public temp/public +cp package.json temp/package.json +cp package-lock.json temp/package-lock.json +cp .env temp/.env +cp index.html temp/index.html +cp postcss.config.js temp/postcss.config.js +cp tailwind.config.js temp/tailwind.config.js +cp tsconfig.json temp/tsconfig.json +cp tsconfig.node.json temp/tsconfig.node.json +cp vite.config.ts temp/vite.config.ts +cp .gitignore temp/.gitignore + +# Zip +zip -r seng365-assignment2-omdb-vno16.zip temp + +# Remove temp +rm -rf temp \ No newline at end of file