Skip to content

Commit cea996a

Browse files
committed
Make non-windows builds work
1 parent 7997f8c commit cea996a

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

build.sh

100644100755
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ CONFIGURATION=Release
1212
PUBLIC=""
1313
BUILD=0
1414
UPM=0
15+
UNITYVERSION=2019.2
16+
YAMATO=0
1517

1618
while (( "$#" )); do
1719
case "$1" in
@@ -37,15 +39,21 @@ while (( "$#" )); do
3739
-*|--*=) # unsupported flags
3840
echo "Error: Unsupported flag $1" >&2
3941
exit 1
40-
;;
4142
;;
4243
esac
4344
shift
4445
done
4546

47+
if [[ x"${YAMATO_JOB_ID:-}" != x"" ]]; then
48+
YAMATO=1
49+
export GITLAB_CI=1
50+
export CI_COMMIT_TAG="${GIT_TAG:-}"
51+
export CI_COMMIT_REF_NAME="${GIT_BRANCH:-}"
52+
fi
53+
4654
pushd $DIR >/dev/null 2>&1
4755

48-
if [[ x"$APPVEYOR" == x"" ]]; then
56+
if [[ x"${APPVEYOR:-}" == x"" ]]; then
4957
dotnet restore
5058
fi
5159
dotnet build --no-restore -c $CONFIGURATION $PUBLIC

clean.sh

100644100755
File mode changed.

pack.sh

100644100755
Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ CONFIGURATION=Release
1212
PUBLIC=""
1313
BUILD=0
1414
UPM=0
15+
UNITYVERSION=2019.2
16+
YAMATO=0
1517

1618
while (( "$#" )); do
1719
case "$1" in
@@ -37,19 +39,30 @@ while (( "$#" )); do
3739
-*|--*=) # unsupported flags
3840
echo "Error: Unsupported flag $1" >&2
3941
exit 1
40-
;;
4142
;;
4243
esac
4344
shift
4445
done
4546

47+
if [[ x"${YAMATO_JOB_ID:-}" != x"" ]]; then
48+
echo 1
49+
YAMATO=1
50+
export GITLAB_CI=1
51+
export CI_COMMIT_TAG="${GIT_TAG:-}"
52+
export CI_COMMIT_REF_NAME="${GIT_BRANCH:-}"
53+
fi
54+
4655
pushd $DIR >/dev/null 2>&1
56+
4757
if [[ x"$BUILD" == x"1" ]]; then
48-
if [[ x"$APPVEYOR" == x"" ]]; then
58+
59+
if [[ x"${APPVEYOR:-}" == x"" ]]; then
4960
dotnet restore
5061
fi
5162
dotnet build --no-restore -c $CONFIGURATION $PUBLIC
63+
5264
fi
65+
5366
dotnet pack --no-build --no-restore -c $CONFIGURATION $PUBLIC
5467

5568
if [[ x"$UPM" == x"1" ]]; then
@@ -64,15 +77,16 @@ else
6477
{
6578
EOL
6679

67-
pushd $srcdir
80+
pushd $srcdir >/dev/null 2>&1
6881
count=0
6982
for j in `ls -d *`; do
70-
echo $j
71-
pushd $j
83+
echo "Packing $j"
84+
85+
pushd $j >/dev/null 2>&1
7286
tgz="$(npm pack -q)"
7387
mv -f $tgz $targetdir/$tgz
7488
cp package.json $targetdir/$tgz.json
75-
popd
89+
popd >/dev/null 2>&1
7690

7791
comma=""
7892
if [[ x"$count" == x"1" ]]; then comma=","; fi
@@ -84,10 +98,11 @@ EOL
8498

8599
count=1
86100
done
87-
popd
101+
popd >/dev/null 2>&1
88102

89103
cat >>$targetdir/packages.json <<EOL
90104
}
91105
EOL
106+
92107
fi
93108
popd >/dev/null 2>&1

test.sh

100644100755
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PUBLIC=""
1313
BUILD=0
1414
UPM=0
1515
UNITYVERSION=2019.2
16+
YAMATO=0
1617

1718
while (( "$#" )); do
1819
case "$1" in
@@ -38,17 +39,23 @@ while (( "$#" )); do
3839
-*|--*=) # unsupported flags
3940
echo "Error: Unsupported flag $1" >&2
4041
exit 1
41-
;;
4242
;;
4343
esac
4444
shift
4545
done
4646

47+
if [[ x"${YAMATO_JOB_ID:-}" != x"" ]]; then
48+
YAMATO=1
49+
export GITLAB_CI=1
50+
export CI_COMMIT_TAG="${GIT_TAG:-}"
51+
export CI_COMMIT_REF_NAME="${GIT_BRANCH:-}"
52+
fi
53+
4754
pushd $DIR >/dev/null 2>&1
4855

4956
if [[ x"$BUILD" == x"1" ]]; then
5057

51-
if [[ x"$APPVEYOR" == x"" ]]; then
58+
if [[ x"${APPVEYOR:-}" == x"" ]]; then
5259
dotnet restore
5360
fi
5461

0 commit comments

Comments
 (0)