-
Notifications
You must be signed in to change notification settings - Fork 47
/
pack.ps1
19 lines (19 loc) · 895 Bytes
/
pack.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$VERSION="$VERSION"
if ($VERSION -eq "") { $VERSION="2.5" }
echo $(
rd nil.js\bin -Force -Recurse -erroraction 'silentlycontinue'
rd nil.js\obj -Force -Recurse -erroraction 'silentlycontinue'
mkdir nuget -erroraction 'silentlycontinue'
) > $null
$REVISION=$(git rev-list --count origin/develop)
echo "VERSION: $VERSION.$REVISION"
[System.IO.File]::WriteAllText("$(get-location)\\NiL.JS\\Properties\\InternalInfo.cs","internal static class InternalInfo
{
internal const string Version = ""$VERSION.$($REVISION)"";
internal const string Year = ""$(get-date -Format yyyy)"";
}")
cd NiL.JS
dotnet build -c Release -property:VersionPrefix=$VERSION.$($REVISION) -property:SignAssembly=true
dotnet pack -c Release -property:VersionPrefix=$VERSION.$($REVISION) -property:SignAssembly=true
mv -Force bin/release/NiL.JS.$VERSION.$($REVISION).nupkg ../nuget/NiL.JS.$VERSION.$($REVISION).nupkg
cd ..