Skip to content

Commit

Permalink
Merge pull request #4 from jskeet/depend-on-rc1
Browse files Browse the repository at this point in the history
Build preparation for serialization
  • Loading branch information
jskeet authored Mar 27, 2017
2 parents fe8a290 + 6a5abae commit ccbd4cc
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
43 changes: 43 additions & 0 deletions build/buildrelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

set -e

cd $(dirname $0)

if [[ $# -ne 1 ]]; then
echo 'Usage: buildrelease.sh version'
echo 'e.g. buildrelease.sh 2.0.0'
echo 'or buildrelease.sh 2.0.0-rc1'
echo 'It is expected that a git tag will already exist'
exit 1
fi

declare -r VERSION=$1
declare -r SUFFIX=$(echo $VERSION | cut -s -d- -f2)
declare -r BUILD_FLAG=${SUFFIX:+--version-suffix ${SUFFIX}}
declare -r RESTORE_FLAG=${SUFFIX:+-p:VersionSuffix=${SUFFIX}}
declare -r OUTPUT=artifacts

rm -rf releasebuild
git clone https://github.com/nodatime/nodatime.serialization.git releasebuild
cd releasebuild
git checkout "$VERSION"

# See https://github.com/nodatime/nodatime/issues/713
# and https://github.com/NuGet/Home/issues/3953
# ... but note that from bash, /p has to be -p
dotnet restore $RESTORE_FLAG src/NodaTime.Serialization.JsonNet
dotnet restore $RESTORE_FLAG src/NodaTime.Serialization.Test

dotnet build -c Release $BUILD_FLAG src/NodaTime.Serialization.JsonNet
dotnet build -c Release $BUILD_FLAG src/NodaTime.Serialization.Test

# Even run the slow tests before a release...
dotnet run -c Release -p src/NodaTime.Serialization.Test/NodaTime.Serialization.Test.csproj -f netcoreapp1.0
dotnet run -c Release -p src/NodaTime.Serialization.Test/NodaTime.Serialization.Test.csproj -f net451

mkdir $OUTPUT

dotnet pack --include-symbols --no-build -c Release $BUILD_FLAG src/NodaTime.Serialization.JsonNet
cp src/NodaTime.Serialization.JsonNet/bin/Release/*.nupkg $OUTPUT
cp src/NodaTime.Testing/bin/Release/*.nupkg $OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NodaTime" Version="2.0.0-beta20170123" />
<PackageReference Include="NodaTime" Version="2.0.0-rc3" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NodaTime.Testing" Version="2.0.0-beta20170123" />
<PackageReference Include="NodaTime.Testing" Version="2.0.0-rc3" />
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="NUnitLite" Version="3.6.1" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
Expand Down
28 changes: 28 additions & 0 deletions src/NodaTime.Serialization.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodaTime.Serialization.Test", "NodaTime.Serialization.Test\NodaTime.Serialization.Test.csproj", "{07063FD8-A2C2-43FB-A52C-093F4FB3F483}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodaTime.Serialization.JsonNet", "NodaTime.Serialization.JsonNet\NodaTime.Serialization.JsonNet.csproj", "{40445ECC-0F53-4ED2-A764-C6F81410DF73}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{07063FD8-A2C2-43FB-A52C-093F4FB3F483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07063FD8-A2C2-43FB-A52C-093F4FB3F483}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07063FD8-A2C2-43FB-A52C-093F4FB3F483}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07063FD8-A2C2-43FB-A52C-093F4FB3F483}.Release|Any CPU.Build.0 = Release|Any CPU
{40445ECC-0F53-4ED2-A764-C6F81410DF73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40445ECC-0F53-4ED2-A764-C6F81410DF73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40445ECC-0F53-4ED2-A764-C6F81410DF73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40445ECC-0F53-4ED2-A764-C6F81410DF73}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

0 comments on commit ccbd4cc

Please sign in to comment.