-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from jskeet/depend-on-rc1
Build preparation for serialization
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |