From 20acc13a8a77e9d249b71b8eeb77ba25e7becc56 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Wed, 29 May 2024 17:50:33 -0400 Subject: [PATCH 1/3] chore: add build-tools command to quickly build stuff builds: - at_repl - at_cli - at_cram - at_pkam --- .gitignore | 4 +++- melos.yaml | 3 +++ tools/build-tools.sh | 13 +++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 tools/build-tools.sh diff --git a/.gitignore b/.gitignore index 2311c4ef..2f38db60 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ build/ pubspec.lock pubspec_overrides.yaml +build-tools/ + # Directory created by dartdoc # If you don't generate documentation locally you can remove this line. doc/api/ @@ -30,4 +32,4 @@ doc/api/ #vscode .vscode -pubspec_overrides.yaml #melos \ No newline at end of file +pubspec_overrides.yaml #melos diff --git a/melos.yaml b/melos.yaml index db9aab8c..27b3269c 100644 --- a/melos.yaml +++ b/melos.yaml @@ -2,3 +2,6 @@ name: at_tools packages: - packages/** + +scripts: + build-tools: ./tools/build-tools.sh diff --git a/tools/build-tools.sh b/tools/build-tools.sh new file mode 100755 index 00000000..72ab0edd --- /dev/null +++ b/tools/build-tools.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +script_dir="$(dirname -- "$(readlink -f -- "$0")")" +cd "$script_dir/.." || exit 1 # cd to root of repo + +melos bootstrap --scope=at_cli --scope=at_cram --scope=at_pkam --scope=at_repl + +mkdir -p build-tools + +dart compile exe packages/at_cli/bin/main.dart -o build-tools/at_cli +dart compile exe packages/at_cram/bin/at_cram.dart -o build-tools/at_cram +dart compile exe packages/at_pkam/bin/main.dart -o build-tools/at_pkam +dart compile exe packages/at_repl/bin/at_repl.dart -o build-tools/at_repl From 6e2603161d03afe25a7b39c40640f9699a2b33b4 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Wed, 29 May 2024 17:55:35 -0400 Subject: [PATCH 2/3] docs: add steps to build to the readme --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index e3085ecc..b9e88b89 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,23 @@ atProtocol. [at_ve_doctor](./packages/at_ve_doctor) A very simple way to test the status of the secondaries running in the Virtual Environment. Using the [at_server_status](https://pub.dev/packages/at_server_status) package. + +### Quickly build tools + +Using melos, we can quickly build at_pkam, at_cram, at_cli, and at_repl via the +following commands: + +```bash +dart pub get +dart run melos run build-tools +``` + +Then move the tools to a folder which you've exposed to the path for +convenience, for example: + +``` +cp ./build-tools/* ~/.local/bin/ +# or +sudo cp ./build-tools/* /usr/local/bin/ +``` + From 295c439ee89f29bd3db6d8ae0624e4397b278708 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Wed, 29 May 2024 17:56:43 -0400 Subject: [PATCH 3/3] docs: add type to codeblock --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9e88b89..0eff7c32 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ dart run melos run build-tools Then move the tools to a folder which you've exposed to the path for convenience, for example: -``` +```bash cp ./build-tools/* ~/.local/bin/ # or sudo cp ./build-tools/* /usr/local/bin/