Skip to content

Commit

Permalink
clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
robjharrison committed Aug 6, 2024
1 parent 8c80a55 commit 1a0fad3
Showing 1 changed file with 46 additions and 29 deletions.
75 changes: 46 additions & 29 deletions setup_sparse_checkout.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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]
# git remote set-url --delete origin [https://github.com/data-to-insight/ssd-data-model/tree/main/cms_ssd_clone_la_deployment/east-sussex]

0 comments on commit 1a0fad3

Please sign in to comment.