From 1a0fad3b083b983dc10ae847f10803e3d9b2448b Mon Sep 17 00:00:00 2001 From: Rob Harrison <48765695+robjharrison@users.noreply.github.com> Date: Tue, 6 Aug 2024 09:09:38 +0000 Subject: [PATCH] clean-up --- setup_sparse_checkout.sh | 75 ++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/setup_sparse_checkout.sh b/setup_sparse_checkout.sh index 04e9126..9a31989 100755 --- a/setup_sparse_checkout.sh +++ b/setup_sparse_checkout.sh @@ -1,78 +1,95 @@ #!/bin/bash # chmod +x setup_sparse_checkout.sh -# Clean up any existing deployment directory -rm -rf /workspaces/ssd-data-model/cms_ssd_clone_la_deployment +## Set up clones for each LA's CMS/deployment type +## process logic... +# Create necessary dir +# Clone repo into the current dir +# Clean out existing sparse settings +# Unset cone mode global and local +# Init Sparse Checkout Without Cone Mode +# Config Sparse Checkout (relative paths) +# Reapply Sparse Checkout +# Set permissions (in case needed) + + +### Liquid Logic / SystcmC LA's + +rm -rf /workspaces/ssd-data-model/cms_ssd_clone_la_deployment # only once !! - rm entire clone structure + + -# Create necessary directories cd /workspaces/ssd-data-model mkdir -p cms_ssd_clone_la_deployment/east-sussex cd cms_ssd_clone_la_deployment/east-sussex -# Clone the repo into the current directory git clone --filter=blob:none --no-checkout https://github.com/data-to-insight/ssd-data-model.git . -# Clean out any existing sparse settings rm -f .git/info/sparse-checkout -# Unset cone mode globally and locally git config --global --unset core.sparseCheckoutCone git config --global --unset core.sparseCheckout git config --unset core.sparseCheckoutCone git config --unset core.sparseCheckout -# Initialize Sparse Checkout Without Cone Mode git sparse-checkout init -# Configure Sparse Checkout with relative paths echo 'cms_ssd_extract_sql/systemc/live/' > .git/info/sparse-checkout - -# Reapply Sparse Checkout git sparse-checkout reapply -# Set permissions (in case needed) chmod -R 755 . -# Checkout the main branch git checkout main -# Create necessary directories + cd /workspaces/ssd-data-model mkdir -p cms_ssd_clone_la_deployment/knowsley cd cms_ssd_clone_la_deployment/knowsley -# Clone the repo into the current directory + git clone --filter=blob:none --no-checkout https://github.com/data-to-insight/ssd-data-model.git . -# Clean out any existing sparse settings -rm -f .git/info/sparse-checkout +rm -f .git/info/sparse-checkout -# Unset cone mode globally and locally git config --global --unset core.sparseCheckoutCone git config --global --unset core.sparseCheckout git config --unset core.sparseCheckoutCone git config --unset core.sparseCheckout -# Initialize Sparse Checkout Without Cone Mode + git sparse-checkout init -# Configure Sparse Checkout with relative paths -echo 'cms_ssd_extract_sql/systemc/live/' > .git/info/sparse-checkout -# Reapply Sparse Checkout -git sparse-checkout reapply +echo 'cms_ssd_extract_sql/systemc/live/' > .git/info/sparse-checkout +git sparse-checkout reapply -# Set permissions (in case needed) -chmod -R 755 . +chmod -R 755 . -# Checkout the main branch git checkout main +### Mosaic LA's + +### CareDirector LA's + +### Eclipse LA's + +### Azeus LA's -# Other useful. + + +# Copy/paste as needed + +# # Pull changes from main repo for : knowsley +# cd /workspaces/ssd-data-model/cms_ssd_clone_la_deployment/knowsley +# git pull origin main + +# # Pull changes from main repo for : east-sussex +# cd /workspaces/ssd-data-model/cms_ssd_clone_la_deployment/east-sussex +# git pull origin main + # # check contents of clone folder(s) # git ls-tree -r main --name-only | grep cms_ssd_extract_sql/systemc/live @@ -81,11 +98,11 @@ git checkout main # cat .git/info/sparse-checkout -# # configure Git to disable push access by removing push URL for the remote +# # configure Git to disable push access by removing push URL for the remote(s) # # For knowsley # cd /workspaces/ssd-data-model/cms_ssd_clone_la_deployment/knowsley -# git remote set-url --delete origin [push URL] +# git remote set-url --delete origin [https://github.com/data-to-insight/ssd-data-model/tree/main/cms_ssd_clone_la_deployment/knowsley] # # For east-sussex # cd /workspaces/ssd-data-model/cms_ssd_clone_la_deployment/east-sussex -# git remote set-url --delete origin [push URL] \ No newline at end of file +# git remote set-url --delete origin [https://github.com/data-to-insight/ssd-data-model/tree/main/cms_ssd_clone_la_deployment/east-sussex] \ No newline at end of file