Skip to content

Commit

Permalink
feat(repo): add dotnet buildscripts (aws-samples#229)
Browse files Browse the repository at this point in the history
- Adds dotnet build script build-csharp.sh and modified build.sh to run the former
- Minor fixes to build scripts to improve consistency
  • Loading branch information
NGL321 authored Jan 16, 2020
1 parent 9a6f14c commit d77ab51
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
23 changes: 23 additions & 0 deletions scripts/build-csharp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
scriptdir=$(cd $(dirname $0) && pwd)

# install CDK CLI from npm, so that npx can find it later
cd $scriptdir/../csharp
npm install

# Find and build all CSharp projects
for projFile in $(find $scriptdir/../csharp -name cdk.json); do
(
echo "=============================="
echo "building project: $projFile"
echo "=============================="

cd $(dirname $projFile)
if [[ -f DO_NOT_AUTOTEST ]]; then exit 0; fi

dotnet build src

$scriptdir/synth.sh
)
done
7 changes: 6 additions & 1 deletion scripts/build-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ npm install
# Find and build all Maven projects
for pomFile in $(find $scriptdir/../java -name pom.xml); do
(
echo "=============================="
echo "building project: $(dirname $pomFile)"
echo "=============================="

cd $(dirname $pomFile)
echo "Building project at $(dirname $pomFile)"
if [[ -f DO_NOT_AUTOTEST ]]; then exit 0; fi

mvn compile test

$scriptdir/synth.sh
Expand Down
6 changes: 4 additions & 2 deletions scripts/build-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ verify_star_dependencies() {
# Find and build all NPM projects
for pkgJson in $(find typescript -name package.json | grep -v node_modules); do
(
echo "Building project at $(dirname $pkgJson)"
cd $(dirname $pkgJson)
echo "=============================="
echo "building project: $(dirname $pkgJson)"
echo "=============================="

cd $(dirname $pkgJson)
if [[ -f DO_NOT_AUTOTEST ]]; then exit 0; fi

verify_star_dependencies
Expand Down
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ scriptdir=$(cd $(dirname $0) && pwd)
$scriptdir/build-npm.sh
$scriptdir/build-java.sh
$scriptdir/build-python.sh
$scriptdir/build-csharp.sh

0 comments on commit d77ab51

Please sign in to comment.