32 lines
913 B
PowerShell
32 lines
913 B
PowerShell
# echo "Building"
|
|
## PSVersionTable.PSVersion
|
|
## winget install --id Microsoft.Powershell --source winget
|
|
|
|
mkdir dist
|
|
cd webapp
|
|
npm run build
|
|
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
|
|
Remove-Item dist -Recurse -Force
|
|
cd ..
|
|
# cd dist
|
|
# npm publish
|
|
# cd ..
|
|
|
|
# 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
|
|
|