-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-submodules.ps1
More file actions
28 lines (21 loc) · 1.5 KB
/
setup-submodules.ps1
File metadata and controls
28 lines (21 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# PowerShell script to set up Git submodules for CAT Pattern Tutorial
Write-Host "Setting up Git submodules for CAT Pattern Tutorial..." -ForegroundColor Green
# Remove existing folders
Write-Host "`nRemoving existing folders..." -ForegroundColor Yellow
Remove-Item -Path "Clients\TalentManagement-Angular-Material" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "ApiResources\TalentManagement-API" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "TokenService\Duende-IdentityServer" -Recurse -Force -ErrorAction SilentlyContinue
# Add submodules
Write-Host "`nAdding Angular client submodule..." -ForegroundColor Cyan
git submodule add https://github.com/workcontrolgit/TalentManagement-Angular-Material.git Clients/TalentManagement-Angular-Material
Write-Host "Adding API submodule..." -ForegroundColor Cyan
git submodule add https://github.com/workcontrolgit/TalentManagement-API.git ApiResources/TalentManagement-API
Write-Host "Adding IdentityServer submodule..." -ForegroundColor Cyan
git submodule add https://github.com/workcontrolgit/Duende-IdentityServer.git TokenService/Duende-IdentityServer
# Initialize
Write-Host "`nInitializing submodules..." -ForegroundColor Cyan
git submodule update --init --recursive
Write-Host "`nDone!" -ForegroundColor Green
Write-Host "`nDon't forget to commit the changes:" -ForegroundColor Yellow
Write-Host " git add ." -ForegroundColor White
Write-Host " git commit -m 'Add submodules for Angular client, API, and IdentityServer'" -ForegroundColor White