Skip to content

Commit

Permalink
feat: Auto zip
Browse files Browse the repository at this point in the history
  • Loading branch information
d-exclaimation committed May 15, 2023
1 parent f5e1a56 commit 1a01fe4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ dist-ssr
*.sw?

# Environment variables
.env
.env

# Misc
seng365-assignment2-omdb-vno16.zip
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
30 changes: 30 additions & 0 deletions zip.sh
Original file line number Diff line number Diff line change
@@ -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

1 comment on commit 1a01fe4

@vercel
Copy link

@vercel vercel bot commented on 1a01fe4 May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.