Skip to content

Commit

Permalink
re-enable submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
ejayesh committed Mar 5, 2025
1 parent 6bd3321 commit 64603fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .copilot/phases/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
# Exit early if something goes wrong
set -e

# if [ -f "./.gitmodules" ]; then
# echo ".gitmodules file exists. Modifying URLs..."
# account_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d':' -f5)
# connection_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d'/' -f2)
# git_clone_base_url="https://codestar-connections.eu-west-2.amazonaws.com/git-http/$account_id/eu-west-2/$connection_id/uktrade"
if [ -f "./.gitmodules" ]; then
echo ".gitmodules file exists. Modifying URLs..."
account_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d':' -f5)
connection_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d'/' -f2)
git_clone_base_url="https://codestar-connections.eu-west-2.amazonaws.com/git-http/$account_id/eu-west-2/$connection_id/uktrade"

# git config --global credential.helper '!aws codecommit credential-helper $@'
# git config --global credential.UseHttpPath true
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true

# sed -i "s|url = [email protected]:uktrade/\(.*\).git|url = $git_clone_base_url/\1.git|g" ./.gitmodules
sed -i "s|url = [email protected]:uktrade/\(.*\).git|url = $git_clone_base_url/\1.git|g" ./.gitmodules

# git submodule update --init --remote --recursive
git submodule update --init --remote --recursive

# else
# echo ".gitmodules file does not exist. No URLs to update."
# fi
else
echo ".gitmodules file does not exist. No URLs to update."
fi

# Add commands below to run as part of the pre_build phase

0 comments on commit 64603fd

Please sign in to comment.