-
Notifications
You must be signed in to change notification settings - Fork 1
/
generateArtifacts.bat
56 lines (47 loc) · 2.16 KB
/
generateArtifacts.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@ECHO OFF
:: This batch file details Windows 10, hardware, and networking configuration.
TITLE Auto generate configs and files
ECHO Please wait... Generating files
:: Read properties file
@echo off
For /F "tokens=1* delims==" %%A IN (gradle.properties) DO (
set %%A=%%B
:: IF "%%A"=="ELECTRON_WIN_VERSION_NUMBER" set ELECTRON_WIN_VERSION_NUMBER=%%B
:: IF "%%A"=="ELECTRON_WIN_BUILD_NUMBER" set ELECTRON_WIN_BUILD_NUMBER=%%B
echo %%A, %%B
)
del secrets.properties
echo build.dependency.organization.token=secrettoken>> secrets.properties
echo build.snapshot.organization.token=secrettoken>> secrets.properties
::
ECHO Updating settings.gradle......
powershell -Command "(gc settings.gradle) -replace 'connector-template', '%repo.name%' -replace '#WmTemplateProvider#','%provider.package.name%' -replace '#WmTemplateProviderExt#','%providerext.package.name%' | Out-File -encoding ASCII settings.gradle"
ECHO Renaming package names.....
cd packages
RENAME WmTemplateProvider %provider.package.name%
RENAME WmTemplateProviderExt %providerext.package.name%
cd ..
ECHO Generating gradle.properties for promote project........
cd gradle\promote
del gradle.properties
(
echo #This is an auto generated file.....
echo repo.name=%repo.name%
echo build.version.major=%build.version.major%
echo build.version.minor=%build.version.minor%
echo build.version.micro=%build.version.micro%
echo provider.package.name=%provider.package.name%
echo providerext.package.name=%providerext.package.name%
echo bas.provider.name=%bas.provider.name%
echo bas.provider.build.name=%bas.provider.build.name%
echo bas.providerext.build.name=%bas.providerext.build.name%
) > gradle.properties
cd ..\..
cd .github/workflows
ECHO Updating gradle.yml......
powershell -Command "(gc gradle.yml) -replace '#WmTemplateProvider#','%provider.package.name%' -replace '#WmTemplateProviderExt#','%providerext.package.name%' | Out-File -encoding ASCII gradle.yml"
ECHO Updating provider-validation.yml......
powershell -Command "(gc provider-validation.yml) -replace 'system-connector-template','%repo.name%' | Out-File -encoding ASCII provider-validation.yml"
ECHO Auto generation completed....
cd ..\..
::PAUSE