-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
37 lines (30 loc) · 1018 Bytes
/
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
#!/bin/sh
set -ex
# Clone dogma libraries
git clone https://github.com/dogma-dart/dogma-codegen.git ../dogma-codegen
git clone https://github.com/dogma-dart/dogma-convert.git ../dogma-convert
git clone https://github.com/dogma-dart/dogma-source-analyzer.git ../dogma-source-analyzer
git clone https://github.com/dogma-dart/dogma-union-type.git ../dogma-union-type
# Get version
dart --version
# Get dependencies
pub install
# Verify that the libraries are error and warning-free.
dartanalyzer ${DARTANALYZER_FLAGS} $(ls -rt lib/*.dart)
# Run the tests
pub global activate coverage
OBSERVATORY_PORT=8000
COVERAGE_OUTPUT=coverage.json
dart --checked --observe=${OBSERVATORY_PORT} test/all.dart & \
pub global run coverage:collect_coverage \
--port=${OBSERVATORY_PORT} \
--out ${COVERAGE_OUTPUT} \
--wait-paused \
--resume-isolates & \
wait
pub global run coverage:format_coverage \
--package-root=packages \
--report-on lib \
--in ${COVERAGE_OUTPUT} \
--out lcov.info \
--lcov