File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ if git diff-index --quiet HEAD --; then
10
10
echo " No changes"
11
11
exit 0
12
12
13
+ echo " FINAL_COMMIT_MESSAGE: $FINAL_COMMIT_MESSAGE "
14
+
13
15
else
14
16
git commit -m " $FINAL_COMMIT_MESSAGE " || { echo " Git commit failed" ; exit 1; }
15
17
git push origin main || { echo " Git push failed" ; exit 1; }
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ ClearTarget () {
4
+ echo " Clearing the target repository at: $FULL_TARGET_DOCS_PATH /$PROJECT_NAME "
5
+
6
+ # Check if the target path exists
7
+ if [ -d " $FULL_TARGET_DOCS_PATH /$PROJECT_NAME " ]; then
8
+ # Remove all content at the target path
9
+ rm -rf " ${FULL_TARGET_DOCS_PATH:? } /$PROJECT_NAME "
10
+ echo " Existing docs at ${FULL_TARGET_DOCS_PATH:? } /$PROJECT_NAME removed."
11
+ else
12
+ echo " The target directory does not yet exist and will be created."
13
+ fi
14
+ }
15
+
3
16
CopyDocs () {
4
17
echo " Copying documents to the target repository."
5
18
echo " Source: $FULL_SOURCE_DOCS_PATH "
6
19
echo " Destination: $FULL_TARGET_DOCS_PATH "
7
20
21
+ echo " Clearing the target repository..."
22
+ ClearTarget
23
+
8
24
echo " Files to be copied:"
9
25
# Log the list of files to be copied
10
26
find " $FULL_SOURCE_DOCS_PATH " -type f -print
11
27
echo " ----"
28
+
12
29
echo " Copying files..."
13
30
cp -R " $FULL_SOURCE_DOCS_PATH " " $FULL_TARGET_DOCS_PATH /$PROJECT_NAME "
14
31
echo " Documents copied successfully."
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ source ./src/scripts/parse_commit_info.sh
79
79
80
80
run ConstructCommitMessage " $REPO_NAME " " $COMMIT_MESSAGE " " $PR_NUMBER " " $COMMIT_HASH "
81
81
[[ $output =~ orb\( sample-repo\) :\ Fix:\ Commit\ for\ testing\ https://github.com/infinitered/sample-repo/commit/$COMMIT_HASH ]]
82
+
82
83
>&2 echo " Debug: Output = '$output '" # Verbose log
83
84
84
85
unset REPO_NAME
You can’t perform that action at this time.
0 commit comments