-
Notifications
You must be signed in to change notification settings - Fork 67
/
TeleMedicine.ps1
40 lines (35 loc) · 1.53 KB
/
TeleMedicine.ps1
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
29
30
31
32
33
34
35
36
37
38
39
40
cls
cd D:\AutomationBuildandRun
# "Step 1 copy the code to my local drive
Write-Output "Step 1 Started cloning..."
git clone https://github.com/opensource-emr/Telemedicine --quiet
Write-Output "Cloning finished..."
Write-Output "Step 2 Change to Angular director..."
cd .\Telemedicine\FewaTelemedicine\ClientApp
Write-Output "Step 3 Start installing angular..."
# this command install angular
npm install
Write-Output "Step Installation of Angular finished"
Write-Output "Step 4 Running ng Build..."
ng build --deploy-url=/ClientApp/
Write-Output "Step ng Build finished..."
Write-Output "Step 5 Go to the Dotnet CSPROJ..."
cd..
Write-Output "Step 6 Start building..."
dotnet build
Write-Output "Step Finish dotnet build..."
Write-Output "Step 7 Install dotnet tool..."
dotnet tool install --global dotnet-ef
Write-Output "Step Install dotnet tool finished..."
Write-Output "Step 8 Creating DB..."
& "D:\postgreinstallation\bin\psql.exe" -U postgres -w -d postgres -c " SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'fewatelemedicine'; " | Out-Null
& "D:\postgreinstallation\bin\psql.exe" -U postgres -w -d postgres -c "drop database IF EXISTS fewatelemedicine;" | Out-Null
& "D:\postgreinstallation\bin\psql.exe" -U postgres -w -d postgres -c "create database fewatelemedicine;" | Out-Null
dotnet ef migrations remove
dotnet ef migrations add v1
dotnet ef database update
Write-Output "Step DB Creation finished..."
Write-Output "Step 9 Running the application..."
dotnet build
dotnet run
start ‘https://localhost:5001’