-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note: these are hosed on OS X due to file handle limits, see https://github.com/dotnet/cli/issues/809 for details.
- Loading branch information
Nick Craver
committed
Apr 17, 2016
1 parent
2b488fa
commit 84a8522
Showing
2 changed files
with
701 additions
and
0 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,65 @@ | ||
#!/bin/bash | ||
|
||
echo "" | ||
echo "Installing dotnet cli..." | ||
echo "" | ||
|
||
export DOTNET_INSTALL_DIR="./.dotnet/" | ||
|
||
tools/install.sh | ||
|
||
origPath=$PATH | ||
export PATH="./dotnet/bin/:$PATH" | ||
|
||
if [ $? -ne 0 ]; then | ||
echo >&2 ".NET Execution Environment installation has failed." | ||
exit 1 | ||
fi | ||
|
||
export DOTNET_HOME="$DOTNET_INSTALL_DIR/cli" | ||
export PATH="$DOTNET_HOME/bin:$PATH" | ||
|
||
export autoGeneratedVersion=false | ||
|
||
# Generate version number if not set | ||
if [[ -z "$BuildSemanticVersion" ]]; then | ||
autoVersion="$((($(date +%s) - 1451606400)/60))-$(date +%S)" | ||
export BuildSemanticVersion="rc2-$autoVersion" | ||
autoGeneratedVersion=true | ||
|
||
echo "Set version to $BuildSemanticVersion" | ||
fi | ||
|
||
sed -i '' "s/99.99.99-rc2/1.0.0-$BuildSemanticVersion/g" */*/project.json | ||
|
||
# Restore packages and build product | ||
dotnet restore -v Minimal # Restore all packages | ||
dotnet pack "Dapper" --configuration Release --output "artifacts/packages" | ||
dotnet pack "Dapper.Contrib" --configuration Release --output "artifacts/packages" | ||
|
||
# Build all | ||
# Note the exclude: https://github.com/dotnet/cli/issues/1342 | ||
for d in Dapper*/; do | ||
if [ "$d" != "*.EntityFramework.StrongName" ]; then | ||
echo "Building $d" | ||
pushd "$d" | ||
dotnet build | ||
popd | ||
fi | ||
done | ||
|
||
# Run tests | ||
for d in *.Tests*/; do | ||
echo "Testing $d" | ||
pushd "$d" | ||
dotnet test | ||
popd | ||
done | ||
|
||
sed -i '' "s/1.0.0-$BuildSemanticVersion/99.99.99-rc2/g" */*/project.json | ||
|
||
if [ $autoGeneratedVersion ]; then | ||
unset BuildSemanticVersion | ||
fi | ||
|
||
export PATH=$origPath |
Oops, something went wrong.