Azeez98 commited on
Commit
f77447e
·
verified ·
1 Parent(s): 4f665b9

Create download_and_push.sh

Browse files
Files changed (1) hide show
  1. download_and_push.sh +30 -0
download_and_push.sh ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # Set variables
4
+ REPO_URL="https://github.com/Mekhlafi98/onthego.git"
5
+ BRANCH="main"
6
+ COMMIT_MESSAGE="Add downloaded dependencies"
7
+
8
+ # Clone the repository
9
+ git clone $REPO_URL repo
10
+ cd repo
11
+
12
+ # Create a directory for the dependencies
13
+ mkdir -p dependencies
14
+
15
+ # Download dependencies
16
+ pip download -r /usr/src/app/requirements.txt -d dependencies
17
+
18
+ # Zip the dependencies
19
+ zip -r dependencies.zip dependencies
20
+
21
+ # Add, commit, and push the zip file
22
+ git add dependencies.zip
23
+ git config --global user.email "[email protected]"
24
+ git config --global user.name "Your Name"
25
+ git commit -m "$COMMIT_MESSAGE"
26
+ git push origin $BRANCH
27
+
28
+ # Clean up
29
+ cd ..
30
+ rm -rf repo