forked from dotnet/templating
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-build.sh
executable file
·44 lines (32 loc) · 1002 Bytes
/
ci-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
RID="$( dotnet --info | egrep -e 'RID:' | egrep -o -e ':.*' | egrep -o -e '[^:]+' | egrep -o -e '(\w|\.|-)+' )"
OS="$( echo "$RID" | egrep -o -e .*- | egrep -o -e [^-]+ )"
ARCH="$( echo "$RID" | egrep -o -e -.* | egrep -o -e [^-]+ )"
REPOROOT="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ "$OS" == "ubuntu.16.04" ]; then
OS="ubuntu.14.04"
SPECIAL_OS="YES"
fi
if [ "$SPECIAL_OS" == "YES" ]; then
RID="$OS-$ARCH"
fi
echo "Using RID: $RID"
echo "Using OS: $OS"
CWD="$( pwd )"
if [ ! "$OS" == "osx.10.11" ]; then
DN3BASEDIR0="$( realpath ${BASH_SOURCE[0]} )"
else
DN3BASEDIR0=$BASH_SOURCE[0]
fi
DN3BASEDIR1="$( dirname $DN3BASEDIR0 )"
DN3BASEDIR="$( cd $DN3BASEDIR1 && pwd )"
export DN3B="Release"
cd "$DN3BASEDIR"
echo Using build configuration "$DN3B"
/bin/bash $REPOROOT/harderreset.sh
echo Creating directory structure...
mkdir dev
mkdir dev/BuiltIns
$REPOROOT/build.sh -c $DN3B -r $RID --ci-build --no-templates-build
cd $CWD
echo dotnet new3 is ready!