-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple script to run projects based on the current config
- Loading branch information
1 parent
975177b
commit 0bdcd97
Showing
1 changed file
with
44 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,44 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Simple script to run projects locally based on the current projects config | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Wrong number of script arguments, got $# expected 1" | ||
exit 1 | ||
fi | ||
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
|
||
projectName=$1 | ||
scalaVersion=$2 | ||
if [[ -z $scalaVersion ]]; then | ||
scalaVersion=`${scriptDir}/lastVersionNightly.sc` | ||
fi | ||
extraScalacOptions="" | ||
disabledScalacOptions="" | ||
|
||
echo "projectName: $projectName" | ||
echo "scalaVersion: $scalaVersion" | ||
|
||
ConfigFile="${scriptDir}/../.github/workflows/buildConfig.json" | ||
function config () { | ||
path=".\"$projectName\"$@" | ||
jq -c -r "$path" $ConfigFile | ||
} | ||
DefaultConfig="{}" | ||
|
||
|
||
$scriptDir/../project-builder/build-revision.sh \ | ||
"$(config .project)" \ | ||
"$(config .repoUrl)" \ | ||
"$(config .revision)" \ | ||
"${scalaVersion}" \ | ||
"$(config .version)" \ | ||
"$(config .targets)" \ | ||
"" \ | ||
'1.6.2' \ | ||
"$(config .config // ${DefaultConfig})" \ | ||
"$extraScalacOptions" \ | ||
"$disabledScalacOptions" 2>&1 | tee build-logs.txt | ||
|
||
cat build-status.txt |