mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-28 19:18:58 -04:00
Also clarify in build.ps1, build-steps.ps1 and build-package.ps1 that the '.\tools\Build\...' example is a repository-root command and that callers in other directories must provide a valid path to the scripts Remove the one-off CI3->CI4 migration tooling that is no longer needed: tools/ci4-lang-migration/ and tools/ci4-upgrade-language-interpolation/. Docker is kept at the repository root rather than under tools/, per review feedback. The Windows build scripts remain in tools/build/. Root-relative docker paths are restored in .gitignore, BUILD.md, INSTALL.md, gulpfile.js, and the build-release workflow. --------- Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
93 lines
4.1 KiB
PowerShell
93 lines
4.1 KiB
PowerShell
# ----------------------------------------------------------------
|
|
# Run this Powershell script to "build" OSPOS (one step at a time).
|
|
# The script moves to the repository root itself, so it can be
|
|
# invoked from any working directory.
|
|
# Use ".\tools\build\build-steps.ps1" from the repository root (if you are in
|
|
# another directory, provide a valid path to this script)
|
|
# The leading ".\" tells Powershell that you trust it.
|
|
# ----------------------------------------------------------------
|
|
|
|
# Run from the repository root (two levels up from tools/build/)
|
|
Set-Location -Path (Split-Path -Parent (Split-Path -Parent $PSScriptRoot))
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "1. Run Composer Install and npm install"
|
|
Write-Output "============================================================================="
|
|
|
|
composer install
|
|
npm install
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "2. Run gulp clean "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp clean
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "3. Install version 3 of bootswatch "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp copy-bootswatch
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "4. Install version 5 of bootswatch "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp copy-bootswatch5
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "5. Install the developer mode javascript "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp debug-js
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "6. Install the production mode javascript "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp prod-js
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "7. Install the developer mode css "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp debug-css
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "8. Install the production mode css "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp prod-css
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "9. Install fonts required by vendor utilities "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp copy-fonts
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "10. Inject the required stylesheet and script into the login page "
|
|
Write-Output "============================================================================="
|
|
Read-Host -Prompt "Press any key to continue"
|
|
|
|
npm run gulp inject-login
|
|
|
|
Write-Output "============================================================================="
|
|
Write-Output "11. 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
|
|
}
|
|
|