Skip to content

Commit

Permalink
Update BuildSupport script
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdunelm committed Sep 12, 2017
1 parent 4a8287b commit 0a40a6e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BuildGenerated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ if [ -z ${SKIPPACK+x} ]; then
# Delete all generated nupkgs
echo Deleting existing \'$NUPKG_DIR\' directory...
rm -rf $NUPKG_DIR
dotnet pack Generated.sln --configuration $BUILD_CONFIGURATION --no-build --output $NUPKG_DIR
dotnet pack Generated.sln --configuration $BUILD_CONFIGURATION --no-restore --no-build --output $NUPKG_DIR
fi
34 changes: 28 additions & 6 deletions BuildSupport.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
#!/bin/bash

# Stop if anything errors
set -e

# "nuget restore" fails if local package source directories don't exist.
mkdir -p NuPkgs/Support

# Final output directory of NuPkgs.
MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
NUPKG_DIR=`pwd`/NuPkgs/Support
# Build configuration to build/pack.
BUILD_CONFIGURATION=Release

dotnet restore Src/Support/GoogleApisClient.sln
dotnet build Src/Support/GoogleApisClient.sln --configuration $BUILD_CONFIGURATION
dotnet pack Src/Support/GoogleApisClient.sln --configuration $BUILD_CONFIGURATION --no-build --output $NUPKG_DIR
GOOGLE_APIS_CORE="Src/Support/Google.Apis.Core"
GOOGLE_APIS="Src/Support/Google.Apis"
GOOGLE_APIS_AUTH="Src/Support/Google.Apis.Auth"
GOOGLE_APIS_AUTH_MVC="Src/Support/Google.Apis.Auth.Mvc"

"$MSBUILD" -t:restore $GOOGLE_APIS_CORE
"$MSBUILD" -t:restore $GOOGLE_APIS
"$MSBUILD" -t:restore $GOOGLE_APIS_AUTH
"$MSBUILD" -t:restore $GOOGLE_APIS_AUTH_MVC
"$MSBUILD" -t:restore Src/Support/Google.Apis.PlatformServices
"$MSBUILD" -t:restore Src/Support/Google.Apis.Auth.PlatformServices

"$MSBUILD" -t:build -p:Configuration=Release $GOOGLE_APIS_CORE
"$MSBUILD" -t:build -p:Configuration=Release $GOOGLE_APIS
"$MSBUILD" -t:build -p:Configuration=Release $GOOGLE_APIS_AUTH
"$MSBUILD" -t:build -p:Configuration=Release $GOOGLE_APIS_AUTH_MVC

"$MSBUILD" -t:pack -p:Configuration=Release $GOOGLE_APIS_CORE
"$MSBUILD" -t:pack -p:Configuration=Release $GOOGLE_APIS
"$MSBUILD" -t:pack -p:Configuration=Release $GOOGLE_APIS_AUTH
"$MSBUILD" -t:pack -p:Configuration=Release $GOOGLE_APIS_AUTH_MVC

cp $GOOGLE_APIS_CORE/bin/Release/*.nupkg $NUPKG_DIR
cp $GOOGLE_APIS/bin/Release/*.nupkg $NUPKG_DIR
cp $GOOGLE_APIS_AUTH/bin/Release/*.nupkg $NUPKG_DIR
cp $GOOGLE_APIS_AUTH_MVC/bin/Release/*.nupkg $NUPKG_DIR

0 comments on commit 0a40a6e

Please sign in to comment.