forked from supabase/supabase-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
55 lines (46 loc) · 1.63 KB
/
melos.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
50
51
52
53
54
55
name: SupabaseFlutter
repository: https://github.com/supabase/supabase-flutter
packages:
- packages/*
command:
version:
# Generate commit links in package changelogs.
linkToCommits: true
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
hooks:
preCommit: melos run update-version
bootstrap:
# It seems so that running "pub get" in parallel has some issues (like
# https://github.com/dart-lang/pub/issues/3404). Disabling this feature
# makes the CI much more stable.
runPubGetInParallel: false
usePubspecOverrides: true
scripts:
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks.
analyze:
exec: dart analyze --fatal-warnings --fatal-infos .
format:
exec: dart format lib test -l 80 --set-exit-if-changed
upgrade:
exec: dart pub upgrade
outdated:
exec: dart pub outdated
update-version:
run: |
# Loop through the packages directory
for d in packages/*/ ; do
# Get version number
version=$(awk '/version:/ {
pos=match($2, /[0-9]+\.[0-9]+\.[0-9]+/);
print substr($2, pos, RLENGTH); }' $d/pubspec.yaml)
# Update version.dart file
echo "const version = '$version';" > $d/lib/src/version.dart
done
# Remove the version file for yes_another_json_isolate
rm packages/yet_another_json_isolate/lib/src/version.dart
# Stage the version.dart file change
git add packages/*/lib/src/version.dart
description: Updates the version.dart file for each packages except yet_another_json_isolate