forked from codetuner/Arebis.Common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPostBuild.cmd
30 lines (26 loc) · 1.12 KB
/
PostBuild.cmd
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
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF "%~5"=="" (
ECHO Include following line the Post-build event of your project^(s^):
ECHO "$(ProjectDir)..\PostBuild.cmd" "$(DevEnvDir)" "$(SolutionPath)" "$(ProjectPath)" "$(TargetPath)" "$(ConfigurationName)"
EXIT /B 1
)
SET DevEnvDir=%~1
SET SolutionPath=%~2
SET SolutionDir=%~dp2
SET SolutionFileName=%~nx2
SET SolutionName=%~n2
SET ProjectPath=%~3
SET ProjectDir=%~dp3
SET ProjectFileName=%~nx3
SET ProjectName=%~n3
SET TargetPath=%~4
SET TargetDir=%~dp4
SET TargetFileName=%~nx4
SET TargetName=%~n4
SET TargetExt=%~x4
SET ConfigurationName=%~5
:: Generate Nuget package (https://docs.nuget.org/create/creating-and-publishing-a-package)
IF EXIST "%~dpn3.nuspec" IF "%ConfigurationName%" NEQ "Debug" NUGET pack "%ProjectPath%" -IncludeReferencedProjects -Prop "Configuration=%ConfigurationName%"
:: Generate Symbols package (https://docs.nuget.org/create/creating-and-publishing-a-symbol-package)
IF EXIST "%~dpn3.nuspec" IF "%ConfigurationName%" NEQ "Debug" NUGET pack "%ProjectPath%" -Symbols -Prop "Configuration=%ConfigurationName%"