-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathpubspec.yaml
More file actions
154 lines (138 loc) Β· 5.5 KB
/
Copy pathpubspec.yaml
File metadata and controls
154 lines (138 loc) Β· 5.5 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: atproto_dart
publish_to: none
environment:
sdk: ">=3.8.0 <4.0.0"
workspace:
- packages/at_primitives
- packages/atproto
- packages/atproto_core
- packages/atproto_identity
- packages/atproto_oauth
- packages/atproto_test
- packages/bluesky
- packages/bluesky_cli
- packages/bluesky_text
- packages/did_plc
- packages/lex_gen
- packages/lexicon
- packages/multiformats
- packages/xrpc
# The repository automation. A workspace member like any other, so the
# derived package list carries it into format, analyze and test instead of
# each job naming it. Its dependencies used to live here, on the root
# package, where nothing could see that they belonged to `scripts/`.
- scripts
- templates/feed_generator
dev_dependencies:
lints: ^6.0.0
melos: ^8.2.0
import_sorter:
git:
url: https://github.com/myConsciousness/import_sorter.git
ref: fix/monorepo-pub-workspaces
melos:
scripts:
setup:
run: |
melos get
melos build
description: Set up the atproto.dart project when cloned. Run `dart pub get` and `dart run build_runner build` in all Dart packages.
get:
run: dart pub get
description: >-
Install dependencies for every package. This is a pub workspace
(`resolution: workspace`), so a single root `dart pub get` resolves all
packages at once instead of running it once per package.
analyze:
run: |
melos exec -c 20 -- \
dart analyze .
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
fmt:
run: |
melos exec --depends-on="import_sorter" -c 20 -- dart run import_sorter
melos exec -c 20 -- dart format .
description: Run `dart format` and `dart run import_sorter:main` in all packages.
build:
run: |
melos exec --depends-on="build_runner" -c 20 -- \
dart run build_runner build clean
melos exec --depends-on="build_runner" -c 1 -- \
dart run build_runner build --delete-conflicting-outputs
description: Run `dart run build_runner build` in all packages.
test:
run: melos exec -- dart test
description: >-
Run all Dart tests in this project, matching CI (which tests every
package). Packages without a `test/` dir are skipped via `dir-exists`.
flutter: false
dir-exists: test
# Dart workspace release, split into three explicit steps (mirroring the
# flutter_* scripts) so each stage can be run and verified independently.
# Note: the step names deliberately avoid the bare name `publish`, which is
# a built-in melos command β a script named `publish` would shadow it and
# recurse when the script body calls `melos publish`.
publish_dry:
run: melos publish --yes
description: >-
Dry-run publish for all Dart workspace packages. `melos publish`
defaults to a dry run, so this only validates the release. `--yes` skips
the Y/n confirmation so it runs non-interactively β nested inside
`melos run` (or any non-TTY shell) there is no terminal to answer the
prompt, which otherwise fails with `CancelledException`. Run this first.
publish_live:
run: melos publish --no-dry-run --git-tag-version --yes
description: >-
Publish all Dart workspace packages to pub.dev and create the git
version tags locally (`--git-tag-version`). `--yes` skips the
confirmation prompt so it runs non-interactively; validate with
`publish_dry` first, then run `publish_tags` to push the tags.
publish_tags:
run: git push origin --tags
description: >-
Push the git version tags created by `publish_live` to origin.
# Flutter packages live outside the Dart pub workspace, so `melos` (and
# therefore the publish scripts above) does not manage them. Release them
# explicitly.
flutter_publish_dry:
run: |
cd packages/bluesky_text_flutter
flutter pub publish --dry-run
description: Dry-run publish the Flutter package (bluesky_text_flutter).
flutter_publish_live:
run: |
cd packages/bluesky_text_flutter
flutter pub publish --force
description: >-
Publish the Flutter package (bluesky_text_flutter) to pub.dev. `--force`
skips the confirmation prompt so it runs non-interactively; validate
with `flutter_publish_dry` first.
flutter_publish_tags:
run: |
cd packages/bluesky_text_flutter
version=$(grep '^version:' pubspec.yaml | awk '{print $2}')
git tag "bluesky_text_flutter-v$version"
git push origin "bluesky_text_flutter-v$version"
description: >-
Tag and push the Flutter package release
(bluesky_text_flutter-vX.Y.Z), matching melos' tag format.
gen:
run: |
dart run ./scripts/gen_lexicon_docs.dart
dart run ./scripts/gen_lexicon_ids.dart
dart run ./scripts/gen_codes.dart
cd packages/atproto
dart run build_runner build --delete-conflicting-outputs
dart fix --apply
cd ../../packages/bluesky
dart run build_runner build --delete-conflicting-outputs
dart fix --apply
cd ../../packages/bluesky_cli
dart fix --apply
cd ../../
melos fmt
dart run ./scripts/gen_lexicon_matrix.dart
dart run ./scripts/gen_supported_api_matrix.dart
description: Generate code for atproto and bluesky based on lexicons.