CoffeeChat/webapp/BUILD.ps1

26 lines
821 B
PowerShell
Raw Permalink Normal View History

2026-04-03 12:35:13 +02:00
# echo "Building"
## PSVersionTable.PSVersion
## winget install --id Microsoft.Powershell --source winget
mkdir dist
npm run build
cp -r .next/static .next/standalone/CoffeeChat/portal/.next
cp -r .next/standalone/CoffeeChat/portal dist
Compress-Archive -Path dist -DestinationPath dist.zip -Force
Remove-Item dist -Recurse -Force
# Create an SSH session
#$remoteUser = "cinton"
#$remoteHost = "rootbranch.co.za:922"
#$session = New-PSSession -HostName "rootbranch.co.za:922" -UserName "cinton" -SSHTransport
# Copy file from Windows to Linux
#Copy-Item -Path dist.zip -Destination "/home/clinton/dist.zip" -ToSession $session
# Copy file from Linux to Windows
# Copy-Item -Path "/home/username/file.txt" -Destination "C:\path\to\local\file.txt" -FromSession $session
# Close the session
#Remove-PSSession $session