-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscripts.yaml
49 lines (41 loc) · 1.17 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
46
47
48
49
test: sip test --bail --recursive --concurrent --test-randomize-ordering-seed random
clean:
(command):
- dart analyze .
- dart format .
pub:
get: sip pub get --recursive --no-version-check --precompile
upgrade:
- sip pub upgrade --recursive --no-version-check --major-versions
prep:
pubspecs: |
# 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):
- '{$clean}'
- '{$pub:get}'
- '{$test}'
- '{$prep:pubspecs}'
- 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