forked from microsoft/Mobius
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetVersion.cmd
More file actions
54 lines (41 loc) · 1.79 KB
/
SetVersion.cmd
File metadata and controls
54 lines (41 loc) · 1.79 KB
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
@echo OFF
rem
rem Copyright (c) Microsoft. All rights reserved.
rem Licensed under the MIT license. See LICENSE file in the project root for full license information.
rem
setlocal enabledelayedexpansion
IF "%1"=="" (goto :usage)
IF "%2"=="" (goto :usage)
set ProjectVersion=%1
@echo [SetVersion.cmd] ProjectVersion=%ProjectVersion
pushd %~dp0
@rem Windows 7/8/10 may not allow powershell scripts by default
powershell -Command Set-ExecutionPolicy -Scope CurrentUser Unrestricted
if "%2" == "examples" (
@echo Updating version number in examples
@rem update Mobius Nuget package version reference only in examples
powershell -f SetSparkClrPackageVersion.ps1 -targetDir ..\..\examples -version %ProjectVersion% -nuspecDir ..\..\csharp -mode %2
) else if "%2" == "core" (
@echo Updating version number in core artifacts (like pom, nuspec files)
@rem update version in pom.xml
pushd ..\..\scala
@echo call mvn versions:set -DnewVersion=%ProjectVersion%
call mvn versions:set -DnewVersion=%ProjectVersion%
popd
@rem update Mobius jar version reference
powershell -f SetSparkClrJarVersion.ps1 -targetDir ..\..\scripts -version %ProjectVersion%
@rem update Moibus Nuget package version in nuspec file
powershell -f SetSparkClrPackageVersion.ps1 -targetDir ..\..\examples -version %ProjectVersion% -nuspecDir ..\..\csharp -mode %2
)
popd
goto :eof
:usage
@echo =============================================================
@echo.
@echo %0 requires a version string as the only parameter.
@echo Example usage below -
@echo %0 1.5.200-preview-1 [core|examples]
@echo core - to update version in Mobius core artifacts (pom, nuspec files)
@echo examples - to update version in Mobius examples
@echo.
@echo =============================================================