File tree Expand file tree Collapse file tree 2 files changed +1662
-4121
lines changed
Expand file tree Collapse file tree 2 files changed +1662
-4121
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Define the directory containing the example files
4- EXAMPLES_DIR=" ./"
53# Define the output file
64OUTPUT_FILE=" copilot.txt"
75
86# Clear the output file if it exists
97> " $OUTPUT_FILE "
108
11- # Generate a list of ignored files using git
12- IGNORED_FILES=$( git ls-files --others --ignored --exclude-standard)
9+ # Add repository structure information at the beginning
10+ cat << 'EOF ' > "$OUTPUT_FILE"
11+ # Repository structure
1312
14- # Find all Python files, excluding those in .gitignore and community folder
15- find . -name " *.py" ! -name " __init__.py" ! -path " ./community/*" | grep -vFf <( echo " $IGNORED_FILES " ) | while read -r file; do
16- # Append the file name to the output file
13+ A Restack backend application should be structured as follows:
14+
15+ - src/
16+ - client.py
17+ - functions/
18+ - __init__.py
19+ - function.py
20+ - workflows/
21+ - __init__.py
22+ - workflow.py
23+ - services.py
24+ - schedule_workflow.py
25+ - pyproject.toml
26+ - env.example
27+ - README.md
28+ - Dockerfile
29+ - restack_up.py
30+
31+ All these files are mandatory.
32+
33+ EOF
34+
35+ # Use git ls-files to get tracked files only, excluding .gitignore files
36+ git ls-files " *.py" | grep -v " __init__.py" | grep -v " community/" | while read -r file; do
37+ echo " Processing: $file " # Debug line
1738 echo " ### File: $file ###" >> " $OUTPUT_FILE "
18- # Append the content of the file to the output file
1939 cat " $file " >> " $OUTPUT_FILE "
20- # Add a newline for separation
2140 echo -e " \n" >> " $OUTPUT_FILE "
2241done
2342
You can’t perform that action at this time.
0 commit comments