-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscripts.yaml
45 lines (39 loc) · 1.12 KB
/
scripts.yaml
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
45
test:
- sip test --test-randomize-ordering-seed random --timeout 60s
format: dart format .
analyze: dart analyze .
prep:
(command):
- (+) {$format} --set-exit-if-changed
- (+) {$analyze} --fatal-infos --fatal-warnings
- (+) {$prep:pubspec}
- sip pub get -r
pubspec: |
# get version from changelog
version=$(grep -m 1 "# " CHANGELOG.md | awk '{print $2}')
echo "Updating pubspec.yaml version to $version"
sed -i '' "s|^version: .*|version: $version|g" "pubspec.yaml"
publish:
(bail):
(command):
- sip test --bail --recursive --concurrent
- "{$prep}"
- dart pub publish
- "{$publish:commit}"
- "{$publish:tag}"
- "{$publish:_push}"
commit: |
# get version from changelog
version=$(grep -m 1 "# " CHANGELOG.md | awk '{print $2}')
echo "Committing version $version"
git add .
git commit -m "v$version"
tag: |
# get version from changelog
version=$(grep -m 1 "# " CHANGELOG.md | awk '{print $2}')
echo "Tagging version $version"
git tag -a "v$version" -m "v$version"
_push: |
echo "Pushing to origin"
git push
git push --tags