From d89e6d90e0149f7e632fcfd7d16d97097316e01c Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:07:20 -0400 Subject: [PATCH] docs: add one-liner tips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eventually `raen` may wrap `near`. Until then, it’s useful to know how to build & deploy in one command. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 89aff15..ae7788f 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,20 @@ This admin panel then reads in that Custom Section, decompresses the brotli, and # Tips +## one-liners + +Dev-deploy in one command: + + near dev-deploy $(raen build --release -q) + +Regular deploy in one command: + + near deploy CONTRACT-NAME $(raen build --release -q) + +Explanation: this uses [command subtitution](https://stackoverflow.com/a/19462303/249801) to put the output of `raen build` at the right spot in the `near [dev-]deploy` command. The `-q` option puts `raen build` in _quiet_ mode, meaning that it only outputs the location of the built file. + +See `near dev-deploy --help`, `near deploy --help`, and `raen build --help` for more info. + ## witgen macro If you define a type that RAEN doesn't recognize (such as in this line `type Amount = Balance;` where RAEN doesn't recognize `Amount`), your build may result in an error like: