-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
64 lines (53 loc) · 1.53 KB
/
Makefile
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
## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t
## unit_tests - Run unit tests
unit_tests:
dart test test/tests.dart
## version - Update version number
# param: number - Version number
version:
@sed -i 's/version: VERSIONADDEDBYGITHUB/version: $(number)/g' pubspec.yaml
@sed -i 's/version: 1.0.0/version: $(number)/g' pubspec.yaml # In case never got reset from temp_version
## temp_version - Set temporary version number
temp_version:
@make version number=1.0.0
## github_version - Set version number for GitHub Actions
github_version:
@make version number=VERSIONADDEDBYGITHUB
## pull_deps - Pull dependencies
pull_deps:
@make temp_version
dart pub get
@make github_version
## update_deps - Update dependencies
update_deps:
@make temp_version
dart pub upgrade
@make github_version
## outdated_deps - Check for outdated dependencies
outdated_deps:
@make temp_version
dart pub outdated
@make github_version
## json_files - Generate JSON files
json_files:
@make temp_version
@dart run build_runner build
@make github_version
## docs - Generate documentation
docs:
@make temp_version
@dart doc
@make github_version
## test_publish - Test publishing to pub.dev
test_publish:
@make temp_version
@dart pub publish --dry-run
@make github_version
## publish - Publish to pub.dev
# param: number - Version number
publish:
@make version number=$(number)
@dart pub publish -f
@make github_version