ci: use vscode tasks and makefile

This commit is contained in:
Rongjian Zhang 2022-10-02 00:59:01 +08:00
parent 706d456c46
commit 3474d931ac
6 changed files with 42 additions and 17 deletions

29
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "all",
"dependsOn": ["json", "github", "gitlab"]
},
{
"label": "json",
"type": "dart",
"command": "dart",
"args": ["run", "build_runner", "watch"]
},
{
"label": "github",
"type": "dart",
"command": "dart",
"cwd": "packages/gql_github",
"args": ["run", "build_runner", "watch"]
},
{
"label": "gitlab",
"type": "dart",
"command": "dart",
"cwd": "packages/gql_gitlab",
"args": ["run", "build_runner", "watch"]
}
]
}

13
makefile Normal file
View File

@ -0,0 +1,13 @@
.PHONY: build
build:
npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0
flutter build ios --no-tree-shake-icons
flutter build apk --no-tree-shake-icons
schema:
# https://docs.github.com/en/graphql/overview/public-schema
curl -o packages/gql_github/lib/schema.graphql https://docs.github.com/public/schema.docs.graphql
npx --yes get-graphql-schema https://gitlab.com/api/graphql > packages/gql_gitlab/lib/schema.graphql
format:
dartfmt --overwrite lib/**/*.dart

View File

@ -1,5 +0,0 @@
#!/bin/bash
npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0
flutter build ios --no-tree-shake-icons
flutter build apk --no-tree-shake-icons

View File

@ -1,3 +0,0 @@
#!/bin/bash
flutter pub run build_runner watch --delete-conflicting-outputs

View File

@ -1,3 +0,0 @@
#!/bin/bash
dartfmt --overwrite lib/**/*.dart

View File

@ -1,6 +0,0 @@
#!/bin/bash
# https://docs.github.com/en/graphql/overview/public-schema
curl -o packages/gql_github/lib/schema.graphql https://docs.github.com/public/schema.docs.graphql
npx --yes get-graphql-schema https://gitlab.com/api/graphql > packages/gql_gitlab/lib/schema.graphql