mirror of
https://github.com/ONLYOFFICE/DocSpace-buildtools.git
synced 2025-04-18 13:44:02 +03:00
# Conflicts: # build.backend.docker.sh # build.static.bat # common/ASC.Api.Core/Security/EmailValidationKeyModelHelper.cs # common/ASC.Core.Common/Caching/CachedTenantService.cs # common/ASC.Core.Common/Core/TenantRegistrationInfo.cs # common/ASC.Core.Common/HostedSolution.cs # common/ASC.Core.Common/Security/EmailValidationKeyProvider.cs # common/ASC.Data.Backup.Core/BackupAjaxHandler.cs # common/ASC.Data.Backup.Core/Contracts/BackupServiceModel.cs # common/ASC.Data.Backup.Core/EF/Model/BackupSchedule.cs # common/ASC.Data.Backup.Core/IntegrationEvents/Events/BackupRequestIntegrationEvent.cs # common/ASC.Data.Backup.Core/Service/BackupService.cs # common/ASC.Data.Backup.Core/Service/ProgressItems/BackupProgressItem.cs # common/ASC.Data.Backup.Core/Tasks/BackupPortalTask.cs # common/ASC.Data.Backup.Core/Tasks/TransferPortalTask.cs # common/services/ASC.ApiSystem/ASC.ApiSystem.csproj # common/services/ASC.ApiSystem/Classes/CommonMethods.cs # common/services/ASC.ApiSystem/Controllers/PortalController.cs # common/services/ASC.ApiSystem/Controllers/SettingsController.cs # common/services/ASC.ApiSystem/GlobalUsings.cs # common/services/ASC.ApiSystem/Models/SettingsModel.cs # common/services/ASC.ApiSystem/Startup.cs # common/services/ASC.Data.Backup.BackgroundTasks/IntegrationEvents/EventHandling/BackupRequestedIntegrationEventHandler.cs # common/services/ASC.Data.Backup/Api/BackupController.cs # common/services/ASC.Data.Backup/ApiModels/BackupDto.cs # common/services/ASC.Data.Backup/ApiModels/BackupScheduleDto.cs # common/services/ASC.Data.Backup/GlobalUsings.cs # frontend.code-workspace # frontend.macos.code-workspace # migrations/mysql/SaaS/MigrationContext/MigrationContextModelSnapshot.cs # migrations/postgre/SaaS/MigrationContext/MigrationContextModelSnapshot.cs # package.json # packages/client/package.json # packages/client/src/components/MainBar/index.js # packages/client/src/components/NavMenu/index.js # packages/client/src/components/NavMenu/sub-components/header-nav.js # packages/client/src/components/NavMenu/sub-components/header.js # packages/client/src/pages/Confirm/sub-components/auth.js # packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js # packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js # packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js # packages/client/src/pages/PortalSettings/categories/common/branding.js # packages/client/src/pages/PortalSettings/categories/common/sub-components/loaderWhiteLabel.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/manual-backup/index.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/restore-backup/sub-components/backup-list/index.js # packages/client/src/pages/PortalSettings/categories/data-management/index.js # packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/index.js # packages/client/src/store/ProfileActionsStore.js # packages/client/webpack.config.js # packages/common/api/index.js # packages/common/api/portal/index.js # packages/common/components/Article/index.js # packages/common/components/Article/sub-components/article-apps.js # packages/common/components/Article/sub-components/article-header.js # packages/common/components/Article/sub-components/article-hide-menu-button.js # packages/common/components/Article/sub-components/article-profile.js # packages/common/store/AuthStore.js # packages/common/store/SettingsStore.js # packages/common/utils/axiosClient.js # packages/common/utils/whiteLabelHelper.js # packages/components/context-menu/index.js # packages/components/themes/base.js # packages/components/themes/dark.js # public/locales/en/Common.json # public/scripts/config.json # web/ASC.Web.Api/Api/Settings/SettingsController.cs # web/ASC.Web.Api/Api/Settings/StorageController.cs # web/ASC.Web.Api/Api/Settings/WhitelabelController.cs # web/ASC.Web.Api/ApiModels/ResponseDto/SettingsDto.cs # web/ASC.Web.Core/Utility/TenantExtra.cs # yarn.lock
70 lines
1.6 KiB
Batchfile
70 lines
1.6 KiB
Batchfile
@echo off
|
|
|
|
for %%i in ("%~dp0..") do set "parentFolder=%%~fi"
|
|
|
|
cd /D "%~dp0"
|
|
call runasadmin.bat "%~dpnx0"
|
|
|
|
if %errorlevel% == 0 (
|
|
PUSHD %~dp0..
|
|
|
|
IF "%2"=="personal" (
|
|
echo "mode=%2"
|
|
) ELSE (
|
|
echo "mode="
|
|
)
|
|
|
|
cd client
|
|
|
|
REM call yarn wipe
|
|
call yarn install
|
|
|
|
REM call yarn build
|
|
IF "%2"=="personal" (
|
|
call yarn build:personal
|
|
) ELSE (
|
|
call yarn build
|
|
)
|
|
|
|
REM call yarn wipe
|
|
IF "%2"=="personal" (
|
|
call yarn deploy:personal
|
|
) ELSE (
|
|
call yarn deploy
|
|
)
|
|
|
|
cd ..
|
|
|
|
REM copy nginx configurations to deploy folder
|
|
xcopy buildtools\config\nginx\onlyoffice.conf publish\nginx\ /E /R /Y
|
|
powershell -Command "(gc publish\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII publish\nginx\onlyoffice.conf"
|
|
|
|
xcopy buildtools\config\nginx\sites-enabled\* publish\nginx\sites-enabled\ /E /R /Y
|
|
|
|
REM fix paths
|
|
powershell -Command "(gc publish\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%parentFolder%\publish\web\client' -replace '\\', '/' | Out-File -encoding ASCII publish\nginx\sites-enabled\onlyoffice-client.conf"
|
|
powershell -Command "(gc publish\nginx\sites-enabled\onlyoffice-management.conf) -replace 'ROOTPATH', '%parentFolder%\publish\web\management' -replace '\\', '/' | Out-File -encoding ASCII publish\nginx\sites-enabled\onlyoffice-management.conf"
|
|
|
|
REM restart nginx
|
|
echo service nginx stop
|
|
call sc stop nginx > nul
|
|
|
|
REM sleep 5 seconds
|
|
call ping 127.0.0.1 -n 6 > nul
|
|
|
|
echo service nginx start
|
|
call sc start nginx > nul
|
|
|
|
if NOT %errorlevel% == 0 (
|
|
echo Couldn't restart Onlyoffice%%~nf service
|
|
)
|
|
|
|
)
|
|
|
|
echo.
|
|
|
|
POPD
|
|
|
|
if "%1"=="nopause" goto start
|
|
pause
|
|
:start |