DocSpace-buildtools/build.static.bat

70 lines
1.6 KiB
Batchfile
Raw Normal View History

2021-10-26 13:39:00 +00:00
@echo off
2023-10-03 10:25:25 +00:00
for %%i in ("%~dp0..") do set "parentFolder=%%~fi"
2021-12-24 13:47:37 +00:00
cd /D "%~dp0"
2021-08-16 12:18:45 +00:00
call runasadmin.bat "%~dpnx0"
2021-10-26 13:39:00 +00:00
2021-08-16 12:18:45 +00:00
if %errorlevel% == 0 (
2021-08-12 13:19:16 +00:00
PUSHD %~dp0..
2021-10-27 10:49:19 +00:00
IF "%2"=="personal" (
echo "mode=%2"
) ELSE (
echo "mode="
)
2023-10-02 14:10:08 +00:00
cd client
REM call yarn wipe
call yarn install
2021-08-12 13:19:16 +00:00
REM call yarn build
2021-10-27 10:49:19 +00:00
IF "%2"=="personal" (
call yarn build:personal
2021-10-27 10:49:19 +00:00
) ELSE (
call yarn build
)
2021-08-12 13:19:16 +00:00
REM call yarn wipe
2021-10-27 10:49:19 +00:00
IF "%2"=="personal" (
call yarn deploy:personal
2021-10-27 10:49:19 +00:00
) ELSE (
call yarn deploy
)
2021-08-12 13:19:16 +00:00
2023-10-02 14:10:08 +00:00
cd ..
2021-08-17 08:00:36 +00:00
REM copy nginx configurations to deploy folder
2023-10-02 14:10:08 +00:00
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"
2021-08-16 16:26:16 +00:00
2023-10-02 14:10:08 +00:00
xcopy buildtools\config\nginx\sites-enabled\* publish\nginx\sites-enabled\ /E /R /Y
2021-08-16 16:26:16 +00:00
2021-08-17 08:00:36 +00:00
REM fix paths
2023-10-03 10:25:25 +00:00
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"
Merge branch 'develop' into feature/management # 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
2023-10-04 16:06:09 +00:00
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"
2021-08-16 12:18:45 +00:00
2021-08-17 08:00:36 +00:00
REM restart nginx
2021-10-26 13:39:00 +00:00
echo service nginx stop
2021-11-15 16:36:09 +00:00
call sc stop nginx > nul
2021-08-17 08:00:36 +00:00
REM sleep 5 seconds
call ping 127.0.0.1 -n 6 > nul
2021-10-26 13:39:00 +00:00
echo service nginx start
2021-11-15 16:36:09 +00:00
call sc start nginx > nul
if NOT %errorlevel% == 0 (
echo Couldn't restart Onlyoffice%%~nf service
2021-11-15 16:36:09 +00:00
)
2021-10-26 13:39:00 +00:00
)
2021-11-15 16:36:09 +00:00
echo.
POPD
2021-10-26 13:39:00 +00:00
if "%1"=="nopause" goto start
pause
:start