forked from opensourcepos/opensourcepos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
32 lines (28 loc) · 1.52 KB
/
build.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
# ------------------------------------------------------
# Run this Powershell script to "build" OSPOS.
# Execute this script from a terminal starting
# with the project root as the working directory.
# Use ".\build.ps1"
# The leading ".\" tells Powershell that you trust it.
# ------------------------------------------------------
Write-Output "============================================================================="
Write-Output "Run Composer Install"
Write-Output "============================================================================="
composer install
Write-Output "============================================================================="
Write-Output "Run NPM Install"
Write-Output "============================================================================="
npm install
Write-Output "============================================================================="
Write-Output "Install the components needed to build OSPOS"
Write-Output "============================================================================="
npm run build
Write-Output "============================================================================="
Write-Output "Restore configured .env file if it exists."
Write-Output "(If one is found in a folder located at ../env/<name-of-ospos-root-folder>)"
Write-Output "============================================================================="
$currentfolder = Split-Path -Path (Get-Location) -Leaf
if(Test-Path -Path ../env/$currentfolder/.env -PathType Leaf)
{
Copy ../env/$currentfolder/.env
}