Spaces:
Paused
Paused
Update init.sh
Browse files
init.sh
CHANGED
|
@@ -19,7 +19,11 @@ if [ -n "$GITHUB_PAT" ]; then
|
|
| 19 |
cd "$TARGET_DIR"
|
| 20 |
|
| 21 |
echo "π Latest Git Commit:"
|
|
|
|
| 22 |
git log -1 --pretty=format:"πΉ %h %s by %an on %ad" --date=short
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
echo "π Moving contents from $TARGET_DIR to $APP_DIR..."
|
| 25 |
shopt -s dotglob # include hidden files like .env, .gitignore
|
|
@@ -39,16 +43,16 @@ if [ -n "$GITHUB_PAT" ]; then
|
|
| 39 |
echo "β
Repository already cloned at $TARGET_DIR"
|
| 40 |
fi
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
# Install Python dependencies
|
| 43 |
if [ -f "$APP_DIR/requirements.txt" ]; then
|
| 44 |
echo "π¦ Installing Python dependencies..."
|
| 45 |
-
pip3 install --no-cache-dir --upgrade -r "
|
| 46 |
else
|
| 47 |
echo "β οΈ No requirements.txt found in $APP_DIR"
|
| 48 |
fi
|
| 49 |
-
|
| 50 |
-
# Change to repo directory
|
| 51 |
-
cd "$APP_DIR"
|
| 52 |
echo "β
Init script complete. Starting application..."
|
| 53 |
# Start the actual app (from CMD)
|
| 54 |
exec "$@"
|
|
|
|
| 19 |
cd "$TARGET_DIR"
|
| 20 |
|
| 21 |
echo "π Latest Git Commit:"
|
| 22 |
+
|
| 23 |
git log -1 --pretty=format:"πΉ %h %s by %an on %ad" --date=short
|
| 24 |
+
git log -1 --pretty=format:"πΉ %h %s by %an on %ad" --date=short
|
| 25 |
+
|
| 26 |
+
echo -e "\n"
|
| 27 |
|
| 28 |
echo "π Moving contents from $TARGET_DIR to $APP_DIR..."
|
| 29 |
shopt -s dotglob # include hidden files like .env, .gitignore
|
|
|
|
| 43 |
echo "β
Repository already cloned at $TARGET_DIR"
|
| 44 |
fi
|
| 45 |
|
| 46 |
+
# Change to repo directory
|
| 47 |
+
cd "$APP_DIR"
|
| 48 |
+
|
| 49 |
# Install Python dependencies
|
| 50 |
if [ -f "$APP_DIR/requirements.txt" ]; then
|
| 51 |
echo "π¦ Installing Python dependencies..."
|
| 52 |
+
pip3 install --no-cache-dir --upgrade -r "requirements.txt"
|
| 53 |
else
|
| 54 |
echo "β οΈ No requirements.txt found in $APP_DIR"
|
| 55 |
fi
|
|
|
|
|
|
|
|
|
|
| 56 |
echo "β
Init script complete. Starting application..."
|
| 57 |
# Start the actual app (from CMD)
|
| 58 |
exec "$@"
|