CoffeeChat/BUILD.ps1

32 lines
913 B
PowerShell
Raw Normal View History

2026-04-03 12:35:13 +02:00
# echo "Building"
## PSVersionTable.PSVersion
## winget install --id Microsoft.Powershell --source winget
mkdir dist
2026-04-06 12:56:17 +02:00
cd webapp
2026-04-03 12:35:13 +02:00
npm run build
2026-04-06 12:56:17 +02:00
cp -r .next/static .next/standalone/gitea/CoffeeChat/webapp/.next
mkdir dist
cp -r .next/standalone/gitea/CoffeeChat/webapp/* dist
Compress-Archive -Path .\dist\* -DestinationPath ..\dist\client-dist.zip -Force
2026-04-03 12:35:13 +02:00
Remove-Item dist -Recurse -Force
2026-04-06 12:56:17 +02:00
cd ..
# cd dist
# npm publish
# cd ..
2026-04-03 12:35:13 +02:00
# 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