Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NanoPatch-UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wortman, Elliot (UG - Comp Sci & Elec Eng)
NanoPatch-UI
Commits
b745bc1a
Commit
b745bc1a
authored
1 year ago
by
Wortman, Elliot (UG - Comp Sci & Elec Eng)
Browse files
Options
Downloads
Patches
Plain Diff
Bash script to create a demo zip
parent
cbd23c3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Replace Vue3 template site with NanoPatch UI & API
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
deploy.sh
+48
-0
48 additions, 0 deletions
deploy.sh
with
50 additions
and
1 deletion
.gitignore
+
2
−
1
View file @
b745bc1a
...
@@ -28,4 +28,5 @@ coverage
...
@@ -28,4 +28,5 @@ coverage
*.sw?
*.sw?
__pycache__/
__pycache__/
env/
env/
\ No newline at end of file
archive.zip
This diff is collapsed.
Click to expand it.
deploy.sh
0 → 100755
+
48
−
0
View file @
b745bc1a
#!/bin/bash -ex
# Check if npm is installed
if
!
hash
npm 2>/dev/null
;
then
echo
"Error: npm is not installed."
exit
1
fi
# Check if zip is installed
if
!
hash
zip 2>/dev/null
;
then
echo
"Error: zip is not installed."
exit
1
fi
# Remove 'dist' and 'node_modules' directories if they exist
echo
"Cleaning up old 'dist' and 'node_modules' directories..."
rm
-rf
dist node_modules
# Run npm install
echo
"Running npm install..."
npm ci
# Run npm build
echo
"Running npm run build..."
npm run build
# Check if the build was successful and 'dist' directory exists
if
[
!
-d
"dist"
]
;
then
echo
"Error: 'dist' directory not found. Build may have failed."
exit
1
fi
# Check if 'requirements.txt' exists
if
[
!
-f
"requirements.txt"
]
;
then
echo
"Error: 'requirements.txt' file not found."
exit
1
fi
# Check if 'app.py' exists
if
[
!
-f
"app.py"
]
;
then
echo
"Error: 'app.py' file not found."
exit
1
fi
# Create a zip file
zip
-r
archive.zip requirements.txt app.py dist
echo
"Archive 'archive.zip' created successfully."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment