2026-04-03 12:35:13 +02:00
|
|
|
# echo "Building"
|
|
|
|
|
## PSVersionTable.PSVersion
|
|
|
|
|
## winget install --id Microsoft.Powershell --source winget
|
|
|
|
|
|
2026-04-06 13:48:43 +02:00
|
|
|
# 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 .\coffeechat\
|
|
|
|
|
# $env:JAVA_HOME="C:\Program Files\Java\jdk-17";mvn clean package
|
|
|
|
|
# cd ..
|
|
|
|
|
# copy coffeechat\target\coffeechat-0.0.1-SNAPSHOT.jar dist
|
|
|
|
|
cd serverWS
|
|
|
|
|
node --experimental-sea-config sea-config.json
|
|
|
|
|
mv .\socket-server ..\dist\
|
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
|
|
|
|
|
|