-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-simple.ps1
More file actions
52 lines (44 loc) · 2.01 KB
/
Copy pathdeploy-simple.ps1
File metadata and controls
52 lines (44 loc) · 2.01 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# SIMPLIFIED DEPLOYMENT SCRIPT FOR AETHERION SAAS APP
# Target: atc.aifreedomtrust.com
#
# This script automates the deployment process using Node.js
# Set execution policy for this process
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
# Print banner
Write-Host "=============================================" -ForegroundColor Magenta
Write-Host " AETHERION SIMPLIFIED DEPLOYMENT SCRIPT " -ForegroundColor Magenta
Write-Host " Target: atc.aifreedomtrust.com " -ForegroundColor Magenta
Write-Host "=============================================" -ForegroundColor Magenta
Write-Host ""
# Check if Node.js is installed
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
Write-Host "ERROR: Node.js is not installed. Please install it and try again." -ForegroundColor Red
exit 1
}
# Check if deploy-to-aifreedomtrust-full.js exists
$deployScript = "deploy-to-aifreedomtrust-full.js"
if (-not (Test-Path $deployScript)) {
Write-Host "ERROR: $deployScript not found in the current directory." -ForegroundColor Red
exit 1
}
# Run the deployment script
Write-Host "Starting deployment process using $deployScript..." -ForegroundColor Cyan
Write-Host "This may take several minutes. Please be patient." -ForegroundColor Yellow
Write-Host ""
try {
# Run the Node.js deployment script
node $deployScript
if ($LASTEXITCODE -eq 0) {
Write-Host "`n=== DEPLOYMENT COMPLETED SUCCESSFULLY ===" -ForegroundColor Green
Write-Host "Your application is now available at: https://atc.aifreedomtrust.com/dapp" -ForegroundColor Green
} else {
Write-Host "`n=== DEPLOYMENT FAILED ===" -ForegroundColor Red
Write-Host "Please check the logs for more information." -ForegroundColor Red
}
} catch {
Write-Host "`n=== DEPLOYMENT FAILED ===" -ForegroundColor Red
Write-Host "Error: $_" -ForegroundColor Red
}
# Keep the window open
Write-Host "`nPress any key to exit..." -ForegroundColor Cyan
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")