diff options
author | Klaus Aehlig <aehlig@linta.de> | 2022-10-31 14:41:13 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-02 10:47:40 +0100 |
commit | 67ce00436268dab9d638f3a72bb20a8b17b706c9 (patch) | |
tree | 9c8ee5f63af9b9652bbcdd4ce98f40cd21b09131 /doc/tutorial/getting-started.org | |
parent | 0407ce3b068a3669ca3482e562ed8f487a55abca (diff) | |
download | justbuild-67ce00436268dab9d638f3a72bb20a8b17b706c9.tar.gz |
Tutorial getting-started: introduce -P
... as an way of directly obtaining an artifact without
an additional detour through the file system.
Diffstat (limited to 'doc/tutorial/getting-started.org')
-rw-r--r-- | doc/tutorial/getting-started.org | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/tutorial/getting-started.org b/doc/tutorial/getting-started.org index 033309fb..36530d5a 100644 --- a/doc/tutorial/getting-started.org +++ b/doc/tutorial/getting-started.org @@ -89,6 +89,26 @@ Note that the ~install~ subcommand initiates the build a second time, without executing any actions as all actions are being served from cache. The produced artifact is identical, which is indicated by the same hash/size/type. +If one is only interested in a single final artifact, one can +also request via the ~-P~ option that this artifact be written to +standard output after the build. As all messages are reported to +standard error, this can be used for both, interactively reading a +text file, as well as for piping the artifact to another program. + +#+BEGIN_SRC sh +$ just build greeter -Pout.txt +INFO: Requested target is [["@","","","greeter"],{}] +INFO: Analysed target [["@","","","greeter"],{}] +INFO: Export targets found: 0 cached, 0 uncached, 0 not eligible for caching +INFO: Discovered 1 actions, 0 trees, 0 blobs +INFO: Building [["@","","","greeter"],{}]. +INFO: Processed 1 actions, 1 cache hits. +INFO: Artifacts built, logical paths are: + out.txt [557db03de997c86a4a028e1ebd3a1ceb225be238:12:f] +Hello World +$ +#+END_SRC + Alternatively, we could also directly request the artifact ~out.txt~ from /justbuild/'s CAS (content-addressable storage) and print it on the command line via: |