Update roles/home/scripts/commits.sh
This commit is contained in:
parent
5ebc68ad80
commit
5a95a015e8
@ -48,17 +48,16 @@ create_pr_from_files() {
|
|||||||
|
|
||||||
echo Our: "${files[@]}"
|
echo Our: "${files[@]}"
|
||||||
echo All: "${all_files[@]}"
|
echo All: "${all_files[@]}"
|
||||||
|
|
||||||
|
git checkout -b "$temp_branch" || handle_error "Failed to create temporary branch"
|
||||||
|
git commit -am "Backup changes" || handle_error "Failed to commit changes to temporary branch"
|
||||||
|
|
||||||
# Switch to base branch and create temporary branch
|
# Switch to base branch and create temporary branch
|
||||||
if [ "$current_branch" != "$base_branch" ]; then
|
if [ "$current_branch" != "$base_branch" ]; then
|
||||||
git checkout "$base_branch" || handle_error "Failed to checkout base branch"
|
git checkout "$base_branch" || handle_error "Failed to checkout base branch"
|
||||||
git pull || handle_error "Failed to sync base branch"
|
git pull || handle_error "Failed to sync base branch"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git checkout -b "$temp_branch" || handle_error "Failed to create temporary branch"
|
|
||||||
git commit -am "Backup changes" || handle_error "Failed to commit changes to temporary branch"
|
|
||||||
|
|
||||||
# Create PR branch from base branch
|
|
||||||
git checkout "$base_branch" || handle_error "Failed to checkout base branch"
|
|
||||||
git checkout -b "$pr_branch" || handle_error "Failed to create PR branch"
|
git checkout -b "$pr_branch" || handle_error "Failed to create PR branch"
|
||||||
|
|
||||||
# Restore specified files from temporary branch
|
# Restore specified files from temporary branch
|
||||||
|
Loading…
Reference in New Issue
Block a user