Updates server url
This commit is contained in:
@@ -55,6 +55,11 @@ jobs:
|
||||
npm ci
|
||||
cd server && npm ci
|
||||
|
||||
- name: Install zip utility
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y zip
|
||||
|
||||
- name: Set CI release version
|
||||
run: >
|
||||
node tools/set-release-version.js
|
||||
@@ -73,6 +78,10 @@ jobs:
|
||||
run: |
|
||||
npx electron-builder --linux --publish never
|
||||
node tools/package-server-executable.js --target node18-linux-x64 --output metoyou-server-linux-x64
|
||||
rm -f dist-electron/metoyou-client-${{ needs.prepare.outputs.release_version }}.zip
|
||||
rm -f dist-server/metoyou-server-linux-x64-${{ needs.prepare.outputs.release_version }}.zip
|
||||
(cd dist && zip -rq ../dist-electron/metoyou-client-${{ needs.prepare.outputs.release_version }}.zip client)
|
||||
(cd dist-server && zip -q metoyou-server-linux-x64-${{ needs.prepare.outputs.release_version }}.zip metoyou-server-linux-x64 sql-wasm.wasm)
|
||||
|
||||
- name: Upload Linux assets
|
||||
env:
|
||||
@@ -121,8 +130,68 @@ jobs:
|
||||
|
||||
- name: Build Windows assets
|
||||
run: |
|
||||
npx electron-builder --win --publish never
|
||||
$projectRoot = $PWD.ProviderPath
|
||||
$electronBuilderWorkspace = Join-Path $env:TEMP ([guid]::NewGuid().ToString('N'))
|
||||
$electronBuilderCache = Join-Path $electronBuilderWorkspace 'electron-builder-cache'
|
||||
$electronCache = Join-Path $electronBuilderWorkspace 'electron-cache'
|
||||
$locationPushed = $false
|
||||
|
||||
function Invoke-RoboCopy {
|
||||
param(
|
||||
[string]$Source,
|
||||
[string]$Destination
|
||||
)
|
||||
|
||||
robocopy $Source $Destination /MIR /NFL /NDL /NJH /NJS /NP | Out-Null
|
||||
|
||||
if ($LASTEXITCODE -gt 7) {
|
||||
throw "robocopy failed from $Source to $Destination with exit code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
# Stage the packaging inputs into a real short-path directory.
|
||||
# electron-builder rejects junction-backed files during asar creation
|
||||
# because their resolved path sits outside the package root.
|
||||
New-Item -ItemType Directory -Path $electronBuilderWorkspace | Out-Null
|
||||
New-Item -ItemType Directory -Path $electronBuilderCache | Out-Null
|
||||
New-Item -ItemType Directory -Path $electronCache | Out-Null
|
||||
$env:ELECTRON_BUILDER_CACHE = $electronBuilderCache
|
||||
$env:ELECTRON_CACHE = $electronCache
|
||||
|
||||
try {
|
||||
Copy-Item -Path (Join-Path $projectRoot 'package.json') -Destination (Join-Path $electronBuilderWorkspace 'package.json') -Force
|
||||
Copy-Item -Path (Join-Path $projectRoot 'package-lock.json') -Destination (Join-Path $electronBuilderWorkspace 'package-lock.json') -Force
|
||||
Invoke-RoboCopy (Join-Path $projectRoot 'dist') (Join-Path $electronBuilderWorkspace 'dist')
|
||||
Invoke-RoboCopy (Join-Path $projectRoot 'images') (Join-Path $electronBuilderWorkspace 'images')
|
||||
Invoke-RoboCopy (Join-Path $projectRoot 'node_modules') (Join-Path $electronBuilderWorkspace 'node_modules')
|
||||
|
||||
Push-Location $electronBuilderWorkspace
|
||||
$locationPushed = $true
|
||||
npx electron-builder --win --publish never
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "electron-builder failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Invoke-RoboCopy (Join-Path $electronBuilderWorkspace 'dist-electron') (Join-Path $projectRoot 'dist-electron')
|
||||
} finally {
|
||||
if ($locationPushed) {
|
||||
Pop-Location
|
||||
}
|
||||
if (Test-Path $electronBuilderWorkspace) {
|
||||
cmd /c rmdir /s /q "$electronBuilderWorkspace" | Out-Null
|
||||
}
|
||||
}
|
||||
node tools/package-server-executable.js --target node18-win-x64 --output metoyou-server-win-x64.exe
|
||||
$serverArchivePath = Join-Path $PWD "dist-server/metoyou-server-win-x64-${{ needs.prepare.outputs.release_version }}.zip"
|
||||
if (Test-Path $serverArchivePath) {
|
||||
Remove-Item $serverArchivePath -Force
|
||||
}
|
||||
Push-Location dist-server
|
||||
try {
|
||||
Compress-Archive -Path metoyou-server-win-x64.exe, sql-wasm.wasm -DestinationPath $serverArchivePath -CompressionLevel Optimal
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
- name: Upload Windows assets
|
||||
env:
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
"publish": [
|
||||
{
|
||||
"provider": "generic",
|
||||
"url": "https://updates.metoyou.invalid"
|
||||
"url": "https://tojusignal.azaaxin.com"
|
||||
}
|
||||
],
|
||||
"mac": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
defaultServerUrl: ''
|
||||
defaultServerUrl: 'https://tojusignal.azaaxin.com'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user