-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetAssemblyInfoConfig_net6.cmd
More file actions
39 lines (31 loc) · 990 Bytes
/
setAssemblyInfoConfig_net6.cmd
File metadata and controls
39 lines (31 loc) · 990 Bytes
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
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
rem check root path from where the AssemblyFiles get searched
if "%~1"=="" goto wrongParam
set root=%1
rem check version number
if "%~2"=="" goto wrongParam
set Version="%~2"
set REPLACE_DLL="..\Develop\Replace.App\bin\Release\net6.0\publish\win-x64\Replace.App.exe"
echo root: %root%
echo version %Version%
%REPLACE_DLL% -c config_with_tags.xml -t #0,%root% #1,%Version% -v
rem everything ok!
:end
echo Assembly infos changed successfully!
ENDLOCAL
exit /B 0
rem one or more arguments are not correct
:wrongParam
echo usage: %~0 rootPath Version Product
echo rootPath: The directory from which the script searches recursively the AssemblyInfo files.
echo Version: The Version number which should get inserted into the AssemblyInfo files.
echo Example %~0 ..\Develop 1.2.3.4
ENDLOCAL
exit /B 1
rem Error occured on replacement
:error
echo replacement of a assemblyinfo failed!
ENDLOCAL
echo Error occurred: errlev: %errorlevel%
exit /B 1