File tree 2 files changed +1662
-4121
lines changed
2 files changed +1662
-4121
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Define the directory containing the example files
4
- EXAMPLES_DIR=" ./"
5
3
# Define the output file
6
4
OUTPUT_FILE=" copilot.txt"
7
5
8
6
# Clear the output file if it exists
9
7
> " $OUTPUT_FILE "
10
8
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
13
12
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
17
38
echo " ### File: $file ###" >> " $OUTPUT_FILE "
18
- # Append the content of the file to the output file
19
39
cat " $file " >> " $OUTPUT_FILE "
20
- # Add a newline for separation
21
40
echo -e " \n" >> " $OUTPUT_FILE "
22
41
done
23
42
You can’t perform that action at this time.
0 commit comments