Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 08b522c

Browse files
committed
Add build script for .NET Core
1 parent 344c958 commit 08b522c

File tree

10 files changed

+67
-17
lines changed

10 files changed

+67
-17
lines changed

NuGet/ServiceStack.Text/servicestack.text.nuspec renamed to NuGet.Core/ServiceStack.Text.Core/servicestack.text.core.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
33
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4-
<id>ServiceStack.Text</id>
4+
<id>ServiceStack.Text.Core</id>
55
<title>.NET's fastest JSON Serializer by ServiceStack</title>
6-
<version>4.0.0</version>
6+
<version>1.0.0</version>
77
<authors>Service Stack</authors>
88
<owners>Service Stack</owners>
99
<summary>.NET's fastest JSON, JSV and CSV Text Serializers</summary>
@@ -42,8 +42,8 @@
4242
</dependencies>
4343
</metadata>
4444
<files>
45-
<file src="lib\**\*.*" target="lib" />
46-
<file src="..\..\src\ServiceStack.Text\**\*.cs" target="src" />
45+
<file src="lib/**/*.*" target="lib" />
46+
<file src="../../src/ServiceStack.Text/**/*.cs" target="src" />
4747
</files>
4848
</package>
4949

NuGet.Core/nuget.exe

3.77 MB
Binary file not shown.

build/build-core.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
3+
if [ -z "$MajorVersion" ]; then
4+
MajorVersion=1
5+
fi
6+
if [ -z "$MinorVersion" ]; then
7+
MinorVersion=0
8+
fi
9+
if [ -z "$PatchVersion" ]; then
10+
PatchVersion=$BUILD_NUMBER
11+
fi
12+
if [ -z "$RELEASE" ]; then
13+
UnstableTag="-unstable"
14+
fi
15+
16+
Version=$MajorVersion.$MinorVersion.$PatchVersion.0
17+
EnvVersion=$MajorVersion.$MinorVersion$PatchVersion
18+
PackageVersion=$MajorVersion.$MinorVersion.$PatchVersion$UnstableTag
19+
20+
echo replace AssemblyVersion
21+
find ./src -type f -name "AssemblyInfo.cs" -exec sed -i "s/AssemblyVersion(\"[^\"]\+\")/AssemblyVersion(\"1.0.0.0\")/g" {} +
22+
echo replace AssemblyFileVersion
23+
find ./src -type f -name "AssemblyInfo.cs" -exec sed -i "s/AssemblyFileVersion(\"[^\"]\+\")/AssemblyFileVersion(\"${Version}\")/g" {} +
24+
25+
echo replace Env
26+
27+
sed -i "s/ServiceStackVersion = [[:digit:]]\+.[[:digit:]]\+m/ServiceStackVersion = ${EnvVersion}m/g" ./src/ServiceStack.Text/Env.cs
28+
29+
echo replace project.json
30+
sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceStack.Text.NetCore/ServiceStack.Text/project.json
31+
32+
echo replace package
33+
sed -i "s/<version>[^<]\+/<version>${PackageVersion}/g" ./NuGet.Core/ServiceStack.Text.Core/servicestack.text.core.nuspec
34+
35+
36+
#restore packages
37+
#(cd ./src/ServiceStack.Text.NetCore && dotnet restore)
38+
#(cd ./tests/ServiceStack.Text.Tests.NetCore && dotnet restore)
39+
40+
#execute tests
41+
#(cd ./tests/ServiceStack.Text.Tests.Nectore/ServiceStack.Text.Tests && dotnet run -c Release)
42+
43+
#nuget pack
44+
#(cd ./NuGet.Core && ./nuget.exe pack ServiceStack.Text.Core/servicestack.text.core.nuspec -symbols)

tests/ServiceStack.Text.Tests.NetCore/ServiceStack.Text/project.json renamed to src/ServiceStack.Text.NetCore/ServiceStack.Text/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"NETStandard.Library": "1.6.0"
1717
},
18-
"compile": ["../../../src/ServiceStack.Text/**/*.cs"],
18+
"compile": ["../../ServiceStack.Text/**/*.cs"],
1919
"frameworks": {
2020
"netstandard1.1": {
2121
"dependencies" : {
@@ -35,5 +35,5 @@
3535
}
3636

3737
},
38-
"version": "4.0.61"
38+
"version": "1.0.0"
3939
}

tests/ServiceStack.Text.Tests.NetCore/Northwind.Common/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"type": "platform",
1818
"version": " 1.0.0"
1919
},
20-
"ServiceStack.Interfaces" : "4.0.*",
20+
"ServiceStack.Interfaces" : "1.0.*",
2121
},
2222
"frameworks" : {
2323
"netcoreapp10" : {

tests/ServiceStack.Text.Tests.NetCore/ServiceStack.Client/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"dependencies": {
1616
"NETStandard.Library": "1.6.0",
1717
"ServiceStack.Text" : {
18-
"version" : "4.0.*"
18+
"version" : "1.0.*"
1919
},
20-
"ServiceStack.Interfaces" : "4.0.*",
20+
"ServiceStack.Interfaces" : "1.0.*",
2121
},
2222
"frameworks": {
2323
"netstandard1.1": {
@@ -38,5 +38,5 @@
3838
"bin" : { "assembly":"../../../lib/tests/netcore/ServiceStack.Client.dll", "pdb" : "../../../lib/tests/netcore/ServiceStack.Client.pdb" }
3939
}
4040
},
41-
"version": "4.0.61"
41+
"version": "1.0.0"
4242
}

tests/ServiceStack.Text.Tests.NetCore/ServiceStack.Common/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"NETStandard.Library": "1.6.0",
1717
"ServiceStack.Text" : {
18-
"version" : "4.0.*"
18+
"version" : "1.0.*"
1919
}
2020
},
2121
"frameworks": {
@@ -37,5 +37,5 @@
3737
"bin" : { "assembly":"../../../lib/tests/netcore/ServiceStack.Common.dll", "pdb" : "../../../lib/tests/netcore/ServiceStack.Common.pdb" }
3838
}
3939
},
40-
"version": "4.0.61"
40+
"version": "1.0.0"
4141
}

tests/ServiceStack.Text.Tests.NetCore/ServiceStack.Interfaces/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
"bin" : { "assembly":"../../../lib/tests/netcore/ServiceStack.Interfaces.dll", "pdb" : "../../../lib/tests/netcore/ServiceStack.Interfaces.pdb" }
3131
}
3232
},
33-
"version": "4.0.61"
33+
"version": "1.0.0"
3434
}

tests/ServiceStack.Text.Tests.NetCore/ServiceStack.Text.Tests/project.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"version": "1.0.0"
2424
},
2525
"NUnitLite" : "3.2.1",
26-
"ServiceStack.Interfaces" : "4.0.*",
26+
"ServiceStack.Interfaces" : "1.0.*",
2727
"Northwind.Common" : "1.*",
28-
"ServiceStack.Text" : "4.0.*",
29-
"ServiceStack.Common" : "4.0.*",
30-
"ServiceStack.Client" : "4.0.*",
28+
"ServiceStack.Text" : "1.0.*",
29+
"ServiceStack.Common" : "1.0.*",
30+
"ServiceStack.Client" : "1.0.*",
3131
},
3232
"frameworks": {
3333
"netcoreapp1.0": {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projects" : [
3+
"../../src/ServiceStack.Text.NetCore",
4+
"ServiceStack.Text.Tests"
5+
]
6+
}

0 commit comments

Comments
 (0)